"But if I've got a program that's linked to the dynamic library and
doesn't do any explicit loading or unloading of libraries, the Xerces-C
lib won't get unloaded and reloaded, right? I mean something like
(functions probably all wrong, I haven't looked at the init code for a
while):

int main(void) {

  while(some_condition) {
    XMLPlatformUtils::initialize();
    // Create parser, do something, output some stuff, destroy parser.
  }
  return 0;
}

That thing won't leak, right? I'm coming at this from a Unix background
and tend to use statically linked stuff, but I had assumed unless you do
funky deliberate library loading, the lib gets loaded once as the
program executes and is unloaded when the program finishes."


You should be fine with that. The init code won't trigger more than once in
this scenario. Though, if you *did* have this scenario, it will still be
more efficient to mvoe the init out of the loop :-)

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]


Reply via email to