On 10/6/10 16:30 CDT, Nick Sabalausky wrote:
"Andrei Alexandrescu"<[email protected]>  wrote in message
news:[email protected]...
On 10/6/10 16:02 CDT, Nick Sabalausky wrote:
So you want to simplify usage of sealed ranges by forcing all classes
that
allocate in their ctor to be reference counted classes instead of GCed?

Almost. Rephrased just a bit:

"So you want to simplify usage of sealed ranges by forcing all structs
that allocate in their this(this) to use reference counted internally
instead of eager copying?"

Yes :o).


Ok. And that means reference counting on the memory the struct allocates in
this(this) (and not on all uses of the struct itself)?

That is correct.

I should emphasize that this is in all likelihood going to be a contentious point to C++ programmers used to eager copy semantics. Reference counting is robust and often economical, but adds hoops to the implementation - each method of the struct must redirect through the refcounted handle and duplicate it if necessary etc.

I fear that it would be windfall for nitpickers, who in turn will influence anyone who likes to worry.


Andrei

Reply via email to