Re: C++/CLI is the way to go
- From: Andre Kaufmann <andre.kaufmann_re_move_@xxxxxxxxxxx>
- Date: Sun, 21 Jan 2007 08:58:21 +0100
Barry Kelly wrote:
Andre Kaufmann wrote:
3) ! The killer argument ;-9
Delphi implements reference counted objects. InterfacedObjects
AFAIK this Delphi code
compiles directly without a modification
to .NET 1.1 ? How can this be ?
Delphi .NET interfaces aren't ref-counted. In fact, this can be
compatibility problem.
Agreed. Just checked the compiled code in BDS 2006. The TInterfaced object is implemented empty, without functions, with a note IInterface is handled differently, I'll have to dig deeper how it's handled next week. So far to the mystery that nearly everything compiles to .NET seamlessly.
I just wonder why I haven't heard about that portability issue in the newsgroups.
Even if they were ref-counted in Delphi .NET, Delphi can't control what
other languages do with the references.
Agreed. The same problem2 you are facing if you are using COM objects in ..NET.
The same problem occurs in any
language that targets the CLR: you can only add these kinds of features,
features which expect all other users to play along, either to the core
CLR, or make that portion of the language incompatible with other CLR
languages.
Yes. I would perhaps prefer going on without reference count support,
than using an incompatible CLR.
Well I perhaps can live with the manual SmartPointer:
SmartPointer<O> p =
new SmartPointer<O>(otherSmartPointer); // Increase reference
...... do something with
p.Dispose(); // Decrease reference and Dispose held object if zero
That's always possible.
And compatible with all .NET languages ;-)
-- Barry
Andre
.
- References:
- A re-announce on GC's defects
- From: Born
- C++/CLI is the way to go
- From: Born
- Re: C++/CLI is the way to go
- From: Willy Denoyette [MVP]
- Re: C++/CLI is the way to go
- From: Andre Kaufmann
- Re: C++/CLI is the way to go
- From: Philip Daniels
- Re: C++/CLI is the way to go
- From: Jon Skeet [C# MVP]
- Re: C++/CLI is the way to go
- From: Andre Kaufmann
- Re: C++/CLI is the way to go
- From: Philip Daniels
- Re: C++/CLI is the way to go
- From: Andre Kaufmann
- Re: C++/CLI is the way to go
- From: Barry Kelly
- A re-announce on GC's defects
- Prev by Date: Re: Where to place "global" objects such as user preferences
- Next by Date: Re: C++/CLI is the way to go
- Previous by thread: Re: C++/CLI is the way to go
- Next by thread: Re: C++/CLI is the way to go
- Index(es):
Relevant Pages
|