[Lazarus] IUnknown and reference counting
Graeme Geldenhuys
graeme at geldenhuys.co.uk
Mon Mar 25 14:45:28 CET 2013
On 2013-03-25 12:03, Hans-Peter Diettrich wrote:
> may not, in detail when imported from other languages. So implementing
> the reference counting methods IMO is the safe way, not using it should
> be reserved for experts.
No, just use the interface implementation (COM or CORBA) based on your
needs. You can freely mix the two in the same unit as well - as is shown
by the Classes unit (classesh.inc to be exact) in FPC.
"reserved for experts"... As I said before, using Interfaces is
considered an _advanced topic_, so when you use them, I assume you know
what you are doing.
> Dunno whether this is required for bare Delphi interfaces. Reference
> counting does not require IUnknown,
We are only talking about Interfaces here, not other language types.
When it comes to interfaces, Delphi requires IUnknown (IInterface, the
base descendant, is an alias to IUnknown). Thus the 3 methods of
IUnknown must always be implemented.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
More information about the Lazarus
mailing list