From: Arno P. <ar...@pu...> - 2010-11-23 01:07:15
|
this should be unrelated to CGRect. CGRect is a Java class like any other. This seems to be related to the reference counting mechanism of the Objective-C backend. When assigning a new value to myrect.size, the old value needs to be released first. This is something that should be done with the reference counting mechanism and if there is a problem I am really surprised because it would indicate a fundamental problem with all setters. Can you mail the generated Objective-C code? Either way, its really time to move to a proper garbage collector. Arno On 11/22/10 4:12 PM, Panayotis Katsaloulis wrote: > I have a question, regarding memory issues and CGRect (and Obj-C backend). > It seems that structs are a bit more complicated than usual. > > > Let's consider the following Java code segment: > > CGRect myrect = new CGRect(0,0,0,0); > // under Obj-C a CGPoint and CGSize will be allocated > > myrect.size = new CGSize(0,0); > // under Obj-C a new CGSize will be applied to the myrect object, > // but the "old" CGSize object is never deallocated > > if I did > myrect.size = null; > myrect.size = new CGSize(0,0); > then the memory will be properly freed > > > Any ideas how to get rid of this problem (apart from changing code writing style?) > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |