Memory Leaks

Posted on 2004-11-03
Last Modified: 2010-04-16

My application uses dll's, record pointers, clientdatasets (linked to xml files), and diagnostic messages (written to text files).

Huge memory leaks galore!! There is problems with virtual memory needed to be expanded.

Attempts to use "Dispose" and "FreeMem" result in EAccessViolation!

Any help please!!!
Question by:VEEPROG
    LVL 8

    Accepted Solution

    may be the madshi diagnostic component will help you to trace your error :

    LVL 22

    Assisted Solution

    AQtime is the best for this job
    LVL 7

    Assisted Solution

    Review your code:

    Everywhere you getmem() or New() an object, allocating memory, be sure there is a corresponding freemem() or dispose(). Many times these are in the create()/destroy() functions of objects.

    Author Comment

    i seem to have some problem with the allocation and free of pointers and clientdatasets.

    for pointers, i am able to use the New(Pointer)......but cannot seem to Dispose(Pointer)

    for clientdatasets, i am able to, however i cannot seem to clientdataset.create
    LVL 7

    Expert Comment

    More help may be forthcoming if you could give short code examples, and report the exact error messages you receive.

    Author Comment


    I've isolated the memory leak problem to the clientdatasets.
    My application is run in real-time, and the clientdatasets are opened and closed (ACTIVE property set to TRE/FALSE) at least every minute. On every instance of open and closing the clientdataset there is a memory leak. The application eventually crashes on memory.

    Is there a problem with the Clientdataset (delphi v6 / v7)?
    Are there any patches?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now