Dynamic Loading of Class Implementation at Runtime.

Alexandre Oliva oliva@dcc.unicamp.br
Thu Dec 10 07:13:00 GMT 1998


On Dec 10, 1998, Benjamin Scherrey <scherrey@gte.net> wrote:

> information on how to load, at runtime, from a shared library, the
> implementation of a class (or its subclass) and then be able to unload
> it and load a new implementation.

I don't quite understand.  There's no important difference between the
implementation of C functions and C++ methods, from the point of view
of a shared library.  The only relevant difference is that C++
libraries may contain dynamic initialization, and destructors of
dynamically initialized objects won't be run when the library is
unloaded, only when the program terminates (and thus the program will
probably crash :-(

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list