From: Panayotis K. <pan...@pa...> - 2010-03-27 15:04:02
|
On 26 Μαρ 2010, at 8:07 μ.μ., Gergely Kis wrote: > Actually we did something very similar with the "synchronized" implementation. > We needed to store locks for each method somewhere, and created something called "XMLVMRegistry" which stores the locks for each object that uses them. I am trying to have a look at it, but I can't find it. Is it possible to tell me where it is? From what you describe though, it looks like we have implemented the same thing. Still, I think I found a better and more elegant solution: the use of associations, which are new in 10.6 and in iPhone SDK 3.1 (this shouldn't be a problem, right?) Documentation can be found here: http://17.254.2.129/iphone/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocAssociativeReferences.html The only problem is that this framework is missing from the emulator! Since we are going to use it only in one specific location (retaining an object when is given as a delegate for example), and since emulator does not suffer from strict memory problems, I believe up to the day this bug will be fixed in the simulation (there is already a bug report for that) we can "ignore" this memory leak under simulator, since it works fine in iPhone. What do you think? |