Does Cocotron support Objective-C garbage collection?

394 Views Asked by At

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?

2

There are 2 best solutions below

1
On BEST ANSWER

This answer may be helpful: Objective C for Windows

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.

0
On

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