views:

120

answers:

2

I'm setting up Cocotron to cross-compile my Mac app into an EXE for Windows... One of the compiler args I had to take out to get it to build using the Cocotron Windows compiler was the flag that enabled Objective-C garbage collection in GCC.

Will I have to add manual reference counting memory management back into my app in order for it not to leak memory while running under Windows? Or is there some other flag to turn on garbage collection in the Cocotron compiler?

A: 

Garbage collection requires the Mac OS X runtime and GC libraries. I don't think the Cocotron runtime supports it.

Chuck
+1  A: 

This answer may be helpful: http://stackoverflow.com/questions/56708/objective-c-for-windows/1683163#1683163

In summary, CoCoTron has its own runtime due to licensing issues, so it will lag Apple's. I suspect it is only that the developers haven't implemented GC yet.

ergosys