Have you seen what Sells Brothers, Inc. is doing with Rotor?

http://www.sellsbrothers.com/spout/#refCountRotor


---
Patrick Steele ([EMAIL PROTECTED])
Lead Software Architect
Image Process Design



> -----Original Message-----
> From: Dejan Jelovic [mailto:dejan@;JELOVIC.COM] 
> Sent: Wednesday, October 23, 2002 2:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [ADVANCED-DOTNET] Exception safety in C#
> 
> 
> Patrick Steele wrote:
> 
> > > What I can't understand why reference couting wasn't
> > > implemented in CLI as a standard facility. A [Counted]
> > > attribute would do the trick nicely.
> > > ...
> >
> > See:
> >
> >
> http://discuss.develop.com/archives/wa.exe?A2=ind0010a&L=dotne
t&P=39459

I've seen Brian's argument, and they make sense if you are discussing
reference counting vs. garbage collection. But what I am saying is that
_optional_ reference counting could be implemented _on top_ of garbage
collection for those interfaces,
classes and references that are marked with the (hypotetical) [Counted]
attribute.

That could be used to ensure that Dispose() is called when the last
[Counted] reference is destroyed, as a way to reclaim handles and other
resources. Then later the garbage collector would come and reclaim the
memory.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to