Hardcoded IInitializable in TLifetimeManagerBase.TryGetInterfaceWithoutCopy

Issue #110 resolved
Former user created an issue

Hello, I think i found a bug in TLifetimeManagerBase. I was trying to get IDisposable interface with singletons to work. But every time on container destruction, function from IInitializable was called.

IInitializable is hardcoded in GetInterface parameters. It should be IID passed from function parameters of course.

141: Result := GetInterface(instance.AsObject, IInitializable, intf);

Solution:

141: Result := GetInterface(instance.AsObject, IID, intf);

Comments (2)

  1. Log in to comment