AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Delphi Speicherproblem mit Objekten in DLL
Thema durchsuchen
Ansicht
Themen-Optionen

Speicherproblem mit Objekten in DLL

Ein Thema von BastiFantasti · begonnen am 4. Dez 2023 · letzter Beitrag vom 8. Dez 2023
 
Kas Ob.

Registriert seit: 3. Sep 2023
229 Beiträge
 
#15

AW: Speicherproblem mit Objekten in DLL

  Alt 7. Dez 2023, 08:15
@BastiFantasti , Hi

For me this behavior looks like dangling pointers (by-copy), this of course will leads to memory leak but not exactly as traditional just not-freed.

So my thoughts here:
1) you can increase the stack reported by FastMM for the leaks by adjusting a constant in FastMM4.pas to something like 30, it might help, or you can use EurekaLog as it will report the leaks with far more accuracy, as i can't see if the record (you mentioned in the second post) in the report, did it leak too ?
2) the most crucial thing is to check and then double check, how these record and objects being passed to the DLL, i mean how did you declare the parameters for these managed types or that record, are these "const" or "var" or left as default without modifier, each one will behave differently and this might cause this copy, hence increasing the ref count causing this leak.
3) are doing any sort of casting on managed type or that record? is it passed by pointer or as const ? you can also track its refCount (or any of its managed type field) in memory before calling from the EXE and compare on the DLL after that call.

Hope that helps.
Kas
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:01 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz