This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Dynamic Loading of Class Implementation at Runtime.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]