Interfaces in FPC

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Interfaces in FPC

Rodrigo Palhano-2
Are interfaces in FPC reference counted like in Delphi ?

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Interfaces in FPC

Jonas Maebe-2

On 9 mrt 2006, at 19:34, Rodrigo Palhano wrote:

> Are interfaces in FPC reference counted like in Delphi ?

Yes.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Interfaces in FPC

Rodrigo Palhano
Why is that ? Is there anyway i could deactivate this ref count feature?

On Thu, 09 Mar 2006 15:53:34 -0300, Jonas Maebe  
<[hidden email]> wrote:

>
> On 9 mrt 2006, at 19:34, Rodrigo Palhano wrote:
>
>> Are interfaces in FPC reference counted like in Delphi ?
>
> Yes.
>
>
> Jonas
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



--
Rodrigo Palhano
---------------------------------
Equipe SpeedCASE

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Interfaces in FPC

Jonas Maebe-2

On 9 mrt 2006, at 19:58, Rodrigo Palhano wrote:

> On Thu, 09 Mar 2006 15:53:34 -0300, Jonas Maebe  
> <[hidden email]> wrote:
>
>> On 9 mrt 2006, at 19:34, Rodrigo Palhano wrote:
>>
>>> Are interfaces in FPC reference counted like in Delphi ?
>>
>> Yes.
>
> Why is that ?

Because Delphi also does it and because we are Delphi-compatible? I  
don't know.

> Is there anyway i could deactivate this ref count feature?

I think so, but I don't know how.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Interfaces in FPC

Vincent Snijders
Jonas Maebe wrote:

>
> On 9 mrt 2006, at 19:58, Rodrigo Palhano wrote:
>
>> On Thu, 09 Mar 2006 15:53:34 -0300, Jonas Maebe  
>> <[hidden email]> wrote:
>>
>>> On 9 mrt 2006, at 19:34, Rodrigo Palhano wrote:
>>>
>>>> Are interfaces in FPC reference counted like in Delphi ?
>>>
>>>
>>> Yes.
>>
>>
>> Why is that ?
>
>
> Because Delphi also does it and because we are Delphi-compatible? I  
> don't know.
>
>> Is there anyway i could deactivate this ref count feature?
>
>
> I think so, but I don't know how.
>

Add {$INTERFACES CORBA} to your source.

See http://www.freepascal.org/docs-html/prog/progsu27.html and
http://www.freepascal.org/docs-html/ref/refse36.html

Vincent
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Interfaces in FPC

Michael Van Canneyt
In reply to this post by Jonas Maebe-2


On Thu, 9 Mar 2006, Jonas Maebe wrote:

>
> On 9 mrt 2006, at 19:58, Rodrigo Palhano wrote:
>
> > On Thu, 09 Mar 2006 15:53:34 -0300, Jonas Maebe
> > <[hidden email]> wrote:
> >
> >> On 9 mrt 2006, at 19:34, Rodrigo Palhano wrote:
> >>
> >>> Are interfaces in FPC reference counted like in Delphi ?
> >>
> >> Yes.
> >
> > Why is that ?
>
> Because Delphi also does it and because we are Delphi-compatible? I
> don't know.

Only interfaces which descend from IUnknown (IInterface) are
reference counted. Corba interfaces do not descend from
IInterface and are therefore not reference counted.

There is a command-line switch and a compile-directive to
determine whether the interfaces are COM style or CORBA style
(don't remember exactly which, see programmers guide for
the directive and user's guide for the command-line switch)

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Interfaces in FPC

Rodrigo Palhano
That's really cool, i am starting to love fpc... :)

On Thu, 09 Mar 2006 16:37:18 -0300, Michael Van Canneyt  
<[hidden email]> wrote:

>
>
> On Thu, 9 Mar 2006, Jonas Maebe wrote:
>
>>
>> On 9 mrt 2006, at 19:58, Rodrigo Palhano wrote:
>>
>> > On Thu, 09 Mar 2006 15:53:34 -0300, Jonas Maebe
>> > <[hidden email]> wrote:
>> >
>> >> On 9 mrt 2006, at 19:34, Rodrigo Palhano wrote:
>> >>
>> >>> Are interfaces in FPC reference counted like in Delphi ?
>> >>
>> >> Yes.
>> >
>> > Why is that ?
>>
>> Because Delphi also does it and because we are Delphi-compatible? I
>> don't know.
>
> Only interfaces which descend from IUnknown (IInterface) are
> reference counted. Corba interfaces do not descend from
> IInterface and are therefore not reference counted.
>
> There is a command-line switch and a compile-directive to
> determine whether the interfaces are COM style or CORBA style
> (don't remember exactly which, see programmers guide for
> the directive and user's guide for the command-line switch)
>
> Michael.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



--
Rodrigo Palhano
---------------------------------
Equipe SpeedCASE

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal