Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I have a Perl/Tk application which is loading and calling functions from a C++ dll using the Win32::API module. These functions are being called repeatedly from within a loop.

Under heavy load (after many iterations over these functions),the whole app hangs(does not crash) which probably shows that there is a memory leak.

In the beginning I started looking for GDI and handle leaks but the numbers throughout the application's run are constant whith very small deviation.

The only way I managed under heavy load to make the app run into completion is when I unload and reload the dll from memory (Getmodulehandle,Freelibrary) after a number of iterations. This probably shows that the dll is not releasing memory and instead it increasingly consumes more until the app hangs.

Is that (unloading and reloading the dll) standard procedure when calling repeatedly run time linked dll's, or am I doing something out of the norm and should look for leaks elsewhere?


In reply to Run time linked dll and memory leak by nikosv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-28 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found