From: Spoorthi D'S. <spo...@ma...> - 2012-06-07 09:11:31
|
Sorry for the delayed reply. I spent some time digging through this and from what I can tell there are 2 issues here: 1. UIWindow c wrapper was getting collected since it does not have a reference to it from outside which triggers the collection of the UIWindow Objective-C instance as well. UIWindow should not get collected and should be available through out the life of the application. This would lead to collection of all the objects that UIWindow has references to. 2. In the similar way, in the particular use case mentioned, UIControl C wrapper would get collected since it does not have external reference, leading to collection of the UIControlDelegateWrapper (since the reference to the delegate is part of UIControl wrapper). This issue holds for any delegates. There has been on going effort in automating the generation of Java skeletons as well as the C bridge code for iOS APIs under crossmobile (trunk/crossmobile) which basically parses the iOS headers and generates the Java API and the C wrapper code. This is still not in a complete form but supports most of the APIs. The generated Java skeletons and C wrapper code for iOS SDK 4.3 is checked into the trunk. To make use of this new code base, one needs to use a special flag --xmlvm-new-ios-api. Eg:java -Xmx1G -jar ../../../dist/xmlvm.jar --in=bin/org/xmlvm/test/ios/ --out=out --app-name=HelloWorld --target=iphonec --xmlvm-new-ios-api ; In this new code base, the issue that was faced in the specified test case is solved and seems to work fine. May be you can try to run your application against the new code base and let us know for your feedback. This is checked into the trunk. [You can check the tutorial apps under https://xmlvm.svn.sourceforge.net/svnroot/xmlvm/branches/tutorial/tutorial/ios/ which have been modified to use the new code base] Spoorthi |