[fpc-pascal] Specifying a Interface type via $Interfaces

Dean Zobec dean.zobec at gmail.com
Fri Oct 12 23:07:18 CEST 2007


2007/10/11, Graeme Geldenhuys <graemeg.lists at gmail.com>:
> On 11/10/2007, Dean Zobec <dean.zobec at gmail.com> wrote:
> > > interface types.  Could somebody please explain the difference.  And
> > > why would I use one over the other?
> > Corba interfaces are not reference counted as they don't descend from IUnknown
>
> So other than that, COM interfaces and CORBA interfaces share the same features?
yes IIRC
> As for reference counting - that just means that as soon as the
> reference count for an Interfaces reaches zero, it gets automatically
> freed?
yes, though you have to pay much attention to memory leaks and
possible problems when dealing a lot with interfaces, memory leaks
should be monitored closely.

 CORBA then rather treats them like classes - you can have no
> other objects referencing the class, yet it stays in memory. You
> always need to free it off manually.
Yes, like dealing with normal objects.
> > point of view see this chapter of Delphi in a Nutshell by By Ray
> > Lischner:
> > http://www.oreilly.com/catalog/delphi/chapter/ch02.html
>
> Thanks for the link and quote. It already makes more sense.  Hopefully
> more reading about the topic will strengthen the knowledge when to use
> Interfaces and when to use Class Inheritance.
>
> > I'll try to find some old links about articles I've read years ago.
>
> That will be very much appreciated. Thanks.
Time has deleted a lot of web links, funny how much data and knowledge
gets lost when the webspace is gone.
I'm sure I'll be able to find something shuffling from the old delphi
CDs or papers.
A good article about the use of interfaces in free pascal is really
needed. I think interfaces are a very powerful oop feature. If only I
had time :(

regards,
Dean


>
> Regards,
>   - Graeme -
>
>
> _______________________________________________
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



More information about the fpc-pascal mailing list