Weak references are still not supported, but code that doesn't use them (i.e. any code that wants to be compatible with OS X 10.6) will work fine.
The current implementation is VERY inefficient and has a large number of missed optimisation opportunities: this is the 'make it right' phase, and should be almost equivalent to explicit retain / release code.
- Add objc_gc_collectable_address() to determine whether a pointer is managed
by the GC
- If LIBOBJC_CANARIES is set (optionally to a random number seed) then store a
canary value after every allocation returned by
objc_gc_allocate_collectable() and, when it is finalised, check that the
canary has not been modified, aborting if it has. This catches some
heap-buffer overflows, and currently causes GNUstep to abort.
- If LIBOBJC_LOG_ALLOCATIONS is set to a file name, log all GC-managed
allocations to that file. This gives something like malloc_history on OS X.
- objc_memmove_collectable() now guarantees that all copied pointers remain
visible to the GC at all times (which was the point of the function - the
original implementation was just a quick stub).
- __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.
catching Objective-C objects in C++ catch statements (i.e. they follow
Objective-C semantics, not C++ semantics, irrespective of whether you use C++
or ObjC syntax). We now default to Apple-compatible behaviour, but provide a
function that allows users to select the sane semantics if they prefer.
Added a capability bit for the unified exception model, so code can require it.
This is not really required, since any code using it will link against the
ObjC++ personality function and will get a linker failure if it isn't supported.
Also enabled Objective-C++ stuff by default. This adds a dependency on the C++
standard library (actually on libsupc++, but GNUstep Make wants to link against
libstd++ anyway), which is not ideal. It can be disabled with:
$ gmake objectiver-cxx=no
I suggest that this is only done by people who know that they will never want
Objective-C++ support.
forgot to commit the GNUmakefile change. Note: the anonymous structure field
extension that requires this is part of C1X, so we can probably change this to
--std=c11 once C1X is actually finalised.