Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are leaking 115 instances of that class, then it is <em>that class</em> that is being leaked. The memory occupied by that class, not the memory occupied by the things it refers to, is being leaked. Somewhere, you have 115 instances of <code>TCwcBasicAdapter</code> that you're not freeing.</p> <p>Furthermore, <em>properties</em> don't store data, no matter they're interfaces or some other type. Only fields occupy memory (along with some hidden space the compiler allocates on the class's behalf).</p> <p>So, yes, you are barking up the wrong tree. Your memory leak is somewhere else. When FastMM tells you that you have a memory leak, doesn't it also tell you where each leaked instance was allocated. It has that capability; you might need to adjust some conditional-compilation symbols to enable that feature.</p> <p>Surely it's not <em>only</em> instances of that class that are leaking, though. FastMM should also report some other things leaking, such as instances of the class or classes that implement the interface.</p> <hr> <p>Based on the function you added, I've begun to suspect that it's really <code>TCwcCDSAdapterNavBase</code> that's leaking, and that could be because of the atypical way you use for creating it. Does the exception handler in <code>GetAdapterNav</code> ever run? I doubt it; <code>TObject.GetInterface</code> never explicitly raises an exception. If the object doesn't support the interface, it returns <code>False</code>. All that exception handler could catch are things like access violation and illegal operations, which you really shouldn't be catching there anyway.</p> <p>You can implement that function more directly like this:</p> <pre><code>if Assigned(FDataSet) then Result := TCwcCDSAdapterNavBase.Create(...); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload