Re: [Crystal-cvs] SF.net SVN: crystal:[38283] CS/branches/soc2012/lighter2/apps/tools/ lighter2

res <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <[email protected]>
On 07.07.2012 05:20, res wrote:
> On 06.07.2012 18:25, [email protected] wrote:
>> -    RadMaterial() {refractiveIndex = 1; isTexImageValid=false; produceCaustic= false;}
>> +    RadMaterial() {
>> +      refractiveIndex = 1; isTexImageValid=false; produceCaustic= false;
>> +      lockMutex = new CS::Threading::Mutex();
>> +    }
> 
> 1. lockMutex leaks.
> 2. Why allocate it on the heap anyway? “mutable CS::Threading::Mutex
> lockMutex;” (no pointer) should work fine.

Actually... why lock the material (data) at all?
In theory, since you only access the image data for reading, concurrency
shouldn't be an issue...

-f.r.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop
signature.asc (application/pgp-signature, 262 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/3q0UACgkQNCTzcE/07ewhUACfVA/FPAi3DqlfLMLXQ/j+oCg3
W6IAniKCwlORijOox+2/PLkBU8Z6u6uw
=0cps
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.