kde and garbage collectors

Simon Hausmann hausmann at kde.org
Thu Aug 15 21:21:23 BST 2002


On Thu, Aug 15, 2002 at 10:22:33PM +0000, Joseph Wenninger wrote:
> > > I noticed that that garbage collector only works, if the application
> > > itself is linked against libgc. If only the dlopened library is linked
> > > against libgc, it causes a crash. :((
> >
> > Better search for the cause of this.  Do those libs using libgc replace
> > malloc and friends, or do they use the gc_xxx functions directly?  If the
> > latter (and only then we can hope to have libgc linked to kdeinit) I
> > wonder what would cause a crash when dlopen'ing.  Possibly it's the
> > RTLD_LOCAL with which our plugins are loaded normally?  You would then
> > need to dlopen libgc with RTLD_GLOBAL before loading the plugin.
> >
> 
> Where can I tell the ComponentFactory to use RTLD_GLOBAL instead of RTLD_LOCAL 
> ?

Nowhere. But you can load the library yourself using the
globalLibrary method of KLibLoader and pass it on then.

Simon




More information about the kde-core-devel mailing list