From: Arno P. <ar...@pu...> - 2010-07-28 18:12:43
|
I just committed your patch. Nice job, Paul! Arno On 7/25/10 1:50 PM, Paul Poley wrote: > I have just submitted my patch for synchronization, wait(), wait(long), > notify() & notifyAll(). > I think this will be a great addition to XMLVM. > > I now know what you were referring to, Arno, about how "the simulator > version leaks memory". The root cause of failed associative references > due to importing java_lang_Class.h & java_lang_String.h was xmlvm.h. > Since the Simulator did not support associated references until > recently, a change was previously made to get around that. That blocked > associated references in the simulator for SDK4. Fortunately, that is > not needed anymore, and you'll see I've commented that out in my patch > (69001). > > To help testing, I've attached a demo project. There's a couple of > scenarios in there. I've tested a lot more than is immediately shown in > the demo. By default, the demo has 2 threads that are notified via > notifyAll() from another thread. > > Also, it will probably help testing if you uncomment out the NSLog > statements in java_lang_Object.m. > Also, after generating the obj-c code, I like to go into my Logger & > change the single println to NSLog instead so it includes a timestamp. > > Thanks! > Paul Poley > > > 2010/7/20 Paul Poley <bay...@gm... <mailto:bay...@gm...>> > > Yep, thanks! I was also able to get associative references working > with the SDK simulator 4.0. > > I ran into an anomaly where they do NOT work in java_lang_Object.m. > After a while, I was able to determine that it works once the > imports for java_lang_Class.h & java_lang_String.h are removed. > Unfortunately, the former import cannot be removed. > > One solution is to just make a new category of java_lang_Object in a > separate file & use the associative references, etc. there. > However, I'd rather get down to the root cause to see why this is > happening. I'll dig in further later this week. > > Thanks! > Paul Poley > > On Sun, Jul 18, 2010 at 5:47 PM, Panayotis Katsaloulis > <pan...@pa... <mailto:pan...@pa...>> wrote: > > > On 17 Ιουλ 2010, at 5:36 μ.μ., Panayotis Katsaloulis wrote: > > > 17 Ιουλ 2010, 11:49 π.μ., ο/η Arno Puder <ar...@pu... > <mailto:ar...@pu...>> έγραψε: > > > >> > >> I also wanted to say something about the associations. > Panayotis has > >> reported that they don't work in the simulator but do work > on the actual > >> device. Apparently you've implemented your own solution as a > >> consequence. I would strongly advise against this. For one, > it only > >> matters if it works correctly on the device. I've heard many > times that > >> you cannot get around testing on the real device because of > many subtle > >> differences between the simulator and the device. So, we > should optimize > >> for the device; not the simulator. If the simulator version > leaks > >> memory, so be it. I'm sure Apple will fix that in the next > version of > >> the SDK. > > > > Just a quick note: > > The problem with associations in the simulator was in the > previous version of the SDK. It is possible that with the > release of 4.0 this is not the case any more. Right now I am > practically away from my computer but I will have a look at it > next week. > > > A quick test with the SDK simulator 4.0, showed that object > associations seem to work fine in the simulator now :) > (or at least, they seem to work and no work around is necessary ). > I think the workaround code is not necessary any more. > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first <http://sprint.com/first> -- > http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > xmlvm-users mailing list > xml...@li... > <mailto:xml...@li...> > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > > > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |