> You won't see this problem with old libobjc2 (including the 1.1 release)
> because, like GCC libobjc, it just replaces the old version with the new
> version and lets you deal with the potential memory corruption later.

That is incorrect.  The GNU Objective-C runtime ignores a duplicated class.
Ie, it ignores the "new version" and keeps using the "old version".

And, by the way, as far as I remember the Apple runtime does the same.

This is very useful at times, because (on some platforms at least, where the 
linker
behaves in predictable ways) it allows you to replace an existing class from an 
existing
shared library by linking in a new shared library of your own, which contains 
your own
implementation of the class, in the right order on the command-line so that it 
gets
loaded before the standard one.  Then, you class gets used and the one you want 
to replace
gets ignored.

As a practical example, GNUstep-base used to do this (probably still does!) to 
replace
an existing NXConstantString class in the runtime with its own.

Thanks


_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to