On Tue, 10 Aug 2010 20:28:32 -0400, bearophile <[email protected]> wrote:

Jonathan M Davis:
If attempts to use any reference types in destructors were a compile-time error with a clear error message, that could go a long way in stopping people from
trying to misuse destructors.

This sounds like a positive idea, maybe fit for an enhancement request.

No, reference types are not necessarily heap allocated. Guys, the distinction is heap vs. manual, not reference vs. value. Value types can be on the heap, and references can refer to non-heap data.

Adding artificial restrictions that force casting are not going to help at all.

-Steve

Reply via email to