3

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?

Gabe
  • 84,912
  • 12
  • 139
  • 238
Ben Englert
  • 583
  • 5
  • 17

2 Answers2

1

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.

Community
  • 1
  • 1
ergosys
  • 47,835
  • 5
  • 49
  • 70
  • Actually, the Objective C runtime is open source and can be found at [opensource.apple.com](http://opensource.apple.com) so I was a little puzzled by this comment. Perhaps he meant that the Cocoa runtime is proprietary (it is). I've wondered why Cocotron doesn't use the Apple Runtime. It would save everyone a lot of hassle. – Lloyd Sargent Nov 15 '12 at 15:06
0

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

Chuck
  • 234,037
  • 30
  • 302
  • 389