Recent

Author Topic: Why are my reference counts never reaching to 0(ZERO)  (Read 255 times)

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 969
  • Professional amateur ;-P
Why are my reference counts never reaching to 0(ZERO)
« on: September 10, 2023, 03:53:32 am »
Hey Y'All,

Coming back with a new problem now: Interfaces, and references not reaching 0(ZERO).

My intention is to have a TInterfacedThread, much like the TInterfacedObject.
I created the class, the respective Interface and the QueryInterface, _AddRef, _Release methods required to do the Reference count.

I now need help to assess why my references on IManagerThread and IWorkerThread are not getting to 0, subsequently not calling the destructor and leaking memory like a sieve  :'(

The project is hosted on GitHub and you can get the source here.

Any help will be very appreciated since I'm at the stage pulling my hairs :(

Cheers,
Gus
Lazarus 2.3.0(trunk) FPC 3.3.1(trunk) Ubuntu 23.04 64b Dark Theme
Lazarus 2.2.6(stable) FPC 3.2.2(stable) Ubuntu 23.04 64b Dark Theme
http://github.com/gcarreno

 

TinyPortal © 2005-2018