Are interfaces in FPC reference counted like in Delphi ?
Mailing lists / fpc-pascal / 2006-03
Interfaces in FPC
7 messages · 4 people ·
- RRodrigo Palhano 3
- JJonas Maebe 2
- MMichael Van Canneyt 1
- VVincent Snijders 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Rodrigo Palhano wroteAre interfaces in FPC reference counted like in Delphi ?
Yes.
Jonas
Why is that ? Is there anyway i could deactivate this ref count feature?
Jonas Maebe wrote 13 lines
Rodrigo Palhano wrote 10 lines
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
Jonas Maebe wrote 25 lines
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
Only interfaces which descend from IUnknown (IInterface) are reference counted. Corba…
That's really cool, i am starting to love fpc... :)
Michael Van Canneyt wrote 35 lines
Because Delphi also does it and because we are Delphi-compatible? I don't know. I think…
Jonas Maebe wrote 16 lines
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.
