Re: [Pyobjc-dev] ObjC GC with PyObjC?
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2009-06-03 06:06:57
|
On 3 Jun, 2009, at 0:19, Barry Wark wrote: > Can anyone comment on the current state of PyObjC in relation to the > Objective-C garbage collector? As @bbum said on Twitter: "... I just > don't write desktop code w/o GC anymore. Waste of time not to use GC." > In a PyObjC app that loads Objective-C code via plugin, can we use GC > in the plugin code? No. PyObjC application won't use garbage collection. Furthermore, even though I have added code to PyObjC that should make PyObjC safe when used in a GC environment (such as using CFRetain/CFRelease instead of - retain/-release) I haven't tested yet if that actually works as designed. And to be honest, I haven't even checked yet how I ensure that GC is turned on automaticly. Actually getting PyObjC to be to a point where it is safe to use in GC environment would be several days work, which would be needed to create an environment where the application runs with the ObjC GC turned on and then run tests to ensure that PyObjC keeps working. If I had the time, and funding, I'd much rather work on a port of Python that uses the ObjC garbage collector instead of Python's native memory management. That would allow for a much improved integration between Python and Objective-C, and could remove a number of issues where the bridge is not as transparent as I'd like: KVO could be made to work with native Python objects, no need to worry about ObjC-style weak references where you have to keep the proxy object alive manually (e.g. the outlineview dataprovider protocol). Sadly enough this would probably require several weeks of full-time work, and that's not something I'm able to pull of without funding. Ronald > > Thanks, > Barry > > ------------------------------------------------------------------------------ > OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the > latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |