Re: vestigial delete in language spec

2012-11-02 Thread Don Clugston
On 01/11/12 22:21, Dan wrote: TDPL states -- However, unlike in C++, clear does not dispose of the object’s own memory and there is no delete operator. (D used to have a delete operator, but it was deprecated.) You still can free memory manually if you really, really know what you’re doing

vestigial delete in language spec

2012-11-01 Thread Dan
TDPL states -- However, unlike in C++, clear does not dispose of the object’s own memory and there is no delete operator. (D used to have a delete operator, but it was deprecated.) You still can free memory manually if you really, really know what you’re doing by calling the function

Re: vestigial delete in language spec

2012-11-01 Thread Alex Rønne Petersen
On 01-11-2012 22:21, Dan wrote: TDPL states -- However, unlike in C++, clear does not dispose of the object’s own memory and there is no delete operator. (D used to have a delete operator, but it was deprecated.) You still can free memory manually if you really, really know what you’re doing

Re: vestigial delete in language spec

2012-11-01 Thread Ali Çehreli
On 11/01/2012 02:21 PM, Dan wrote: TDPL states -- However, unlike in C++, clear does not dispose of the object’s own memory and there is no delete operator. Additionally, TDPL predates 'clear's deprecation in December 2012. It is called 'destroy' now. Ali

Re: vestigial delete in language spec

2012-11-01 Thread Jonathan M Davis
On Thursday, November 01, 2012 22:21:11 Dan wrote: struct S { int[] a; // array is privately owned by this instance this(this) { a = a.dup; } ~this() { delete a; } } Is the delete call, then per TDPL not necessary? Is it harmful or harmless? It's not necessary at all. delete is