Re: C++/CLI is the way to go

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Sat, 20 Jan 2007 15:46:20 -0000, Jon Skeet [C# MVP]
<skeet@xxxxxxxxx> wrote:

<Philip Daniels <Philip Daniels>> wrote:

<snip>

Agree. The prompt disposal of objects that live for longer than a
function is a problem. It would be really nice to have a new
attribute:

[ReferenceCount(true)]
class MyClass { ... }

The CLR team investigated all manner of solutions fairly exhaustively.
Because you could do something like:

object o = instanceOfMyClass;
object x = y;

etc, *every* assignment that could *possibly* be a reference-counted
type would need to check whether or not reference counting was
required. That's a painful performance hit.

I can see that would be a problem.


--
Philip Daniels
.



Relevant Pages

  • Re: C++/CLI is the way to go
    ... class MyClass {... ... The CLR team investigated all manner of solutions fairly exhaustively. ... That's a painful performance hit. ...
    (microsoft.public.dotnet.languages.csharp)
  • [OT] BASIC and GC (was: Why isnt multiple inheritance very useful?)
    ... >> reference counting would be the more efficient option) ... Or is that a typo for "Reference counting isn't an alternative to ... But now that some BASICs have dynamic arrays and even partial ...
    (comp.lang.cpp)