Notification texts go here Contact Us Buy Now!

implements directive does not work in 64 bit version

To be precise: the AV does not happen in the line you marked but after it during the epilogue of the method when the LImplementsInterface variable is about to get cleared. Stepping through the code makes me believe this is some compiler glitch but I am not completely certain. Anyhow: the implementation of IImplementsInterface in this line is superfluous and leads to this issue:
TImplementator = class(TCustomImplementator<TImplementsForm>, IImplementsInterface);

The interface was already implemented in the generic TCustomImplementator<T> class and the code will just work (*) when you remove it from TImplementator.

(*) as in there won't be an AV - you still have a memory leak because by using interface delegation you are also delegating the _AddRef/_Release calls and you are delegating them to a TComponent instance - that means you are leaking the TComponentAggregator instance that wraps your TComponent.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.