Deterministic resource freeing - delete deprecation (again)

Alexander aldem+dmars at nk7.net
Wed Apr 27 06:37:56 PDT 2011


On 27.04.2011 15:15, Steven Schveighoffer wrote:

> You can use clear to call the destructor of a class, and then GC.free (if you wish) to free the memory. 

  BTW, why it is called clear()? To me, clearing something is not destruction. For instance, some buffer object may be cleared to empty the buffer, so the action of clear() is counter-intuitive, IMHO.

/Alexander


More information about the Digitalmars-d mailing list