- edited description
Improve detection of refcounting when using AsSingleton
Issue #237
open
Currently the container does a very simple analysis if a class implements ref counting or not (check if inherits from TInterfacedObject).
This can lead to registration defects if the class does not inherit from TInterfacedObject but implements ref counting as the container then mistakenly stores the object reference and manually destroys it in the end (whereas it should only keep an interface reference)
Comments (6)
-
reporter -
reporter - changed status to open
-
reporter - changed version to 1.2
-
reporter - changed milestone to 2.0
-
reporter - changed milestone to 2.1
-
I just hit this issue, spent several hours fighting with the 10.4 debugger to figure out what the cause was!
Perhaps one way do improve this would be to allow the registration of base classes that implement reference counting? - Log in to comment