lame question

Steven Schveighoffer schveiguy at yahoo.com
Mon Apr 18 12:31:07 PDT 2011


On Mon, 18 Apr 2011 15:17:11 -0400, KennyTM~ <kennytm at gmail.com> wrote:

> On Apr 19, 11 01:25, Graham Fawcett wrote:
>> On Mon, 18 Apr 2011 11:38:56 -0400, Steven Schveighoffer wrote:
>>
>>> On Mon, 18 Apr 2011 11:21:46 -0400, Graham Fawcett<fawcett at uwindsor.ca>
>>> wrote:
>>>
> [snip]
>>> The recommended alternative to destruction is to use clear, since it
>>> runs the appropriate finalizers, plus sets it to null.
>>
>> Thanks for that. The documentation for std.array.clear() is rather terse
>> ("clears the managed array"), so your explanation is very helpful.
>>
>> Best,
>> Graham
>>
>
> By 'clear' he means the global function 'clear' in object.di (It seems  
> not documented on the digitalmars website), not  
> std.array.Appender.clear().
>
> https://github.com/D-Programming-Language/druntime/blob/master/import/object.di#L437

That is a large omission! clear should be documented.

I made a bugzilla report:  
http://d.puremagic.com/issues/show_bug.cgi?id=5855

-Steve


More information about the Digitalmars-d mailing list