9 Commits (71e38a048fc06fea0c2015662540d46a33b5c45d)

Author SHA1 Message Date
David Chisnall b3f7b1bac3 Remove Boehm GC support code.
This removes all support for GC mode.

This was deprecated by Apple in OS X 10.8 (2012) and never supported in
iOS.  Very little code ever tried to use it with this runtime.

It's gone from the build system already.
3 years ago
theraven 6a27408e9e Fix malloc() / free() imbalance. 15 years ago
theraven 3a27521f57 Add flag for identifying modules that use ARC. 15 years ago
theraven d1199844cb Lock the GC mode once something has queried it. All of the GNUstep code that
does run-time detection of whether to use GC calls objc_collecting_enabled()
(sometimes indirectly, via NSGarbageCollector) to see if we're in GC mode.
After any of these calls, it is not safe to switch modes.
15 years ago
theraven fe5d1b892a Tweak GC check, make sure GC_init() is called even when ObjC code isn't using GC (stuff internal to the runtime may be) 15 years ago
theraven fcc47bc7ce Fix building without GC support. Still need to make sure that some of the GC functions always work, since they are expected to be no-ops in non-GC mode. 15 years ago
theraven 9dcc66f7f6 Make sure that associated objects and blocks use GC-scanned memory in GC mode.
Blocks do not yet support __weak bound variables.  This needs fixing before the release.
15 years ago
theraven 929f8f95b4 Improved a few GC functions.
Added objc-auto.h header, providing (documented) public interfaces to this
functionality.
15 years ago
theraven ad16172625 First pass at implementing Apple-compatible GC using Boehm. Still needs some tidying, but the following work:
- __strong pointers, preventing objects from being freed

_ __weak pointers are automatically freed when the last remaining __strong pointer goes away

- objc_gc_{retain,release}_np() functions, which can be used to implement CFRetain() and CFRelease() (adds an reference count - the object will not be collected until after its last retain is gone.
15 years ago