title: Any way to FORCE "dlclose()" to free memory?
body: <p>My application processes thousands of messages and uses dlopen / dlclose etc to call functions in shared libraries at runtime.</p>
  
  <p>I have been analysing the memory at runtime and it seems (as I expected) that dlclose() does not free any malloc'ed memory after the close. So I have a rather bad memory leak....</p>
  
  <p>The problem is these shared libs were written by someone else and I am not allowed to change the source. Is there any way around this? I suppose I <em>could</em> call a "subprocess" to process the message and then when it terminates the memory will dissappear for that subprocess....</p>
  
  <p>Any other ideas?</p>
  
  <p>Thanks for the help</p>
  
  <p>Lynton</p>