[fpc-pascal] Implementing an interface force me to add _AddRef, _Release
Graeme Geldenhuys
graemeg.lists at gmail.com
Fri Apr 16 08:52:11 CEST 2010
Marc Weustink het geskryf:
> You cannot use casts like
> var
> a: IMyObject;
> b: IMyOtherObject;
> begin
> b := a as IMyOtherObject;
>
> or functions like supports() (which uses queryinterface)
I remember reading something about this a year or two ago in the mailing
list. As far as I remember, there was an alternative to do the same thing
with CORBA-style interfaces, but for the life of me I can't remember what
it was. I'll keeps searching to see if I can find the answers I am
referring to.
While searching I did find one of my old message threads. And the answers
to the questions I asked then, still elude me [4 years later]. :-(
http://lists.freepascal.org/lists/fpc-devel/2007-November/012060.html
@Michael van Canneyt
Maybe the Language Reference documentation could be extended to include
such information? And maybe address the issues I mentioned the the message
thread link I posted. Many developers seem to struggle with this, and the
documentation seems the right place to address such info.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/
More information about the fpc-pascal
mailing list