How do you deal with scoped allocations?

monarch_dodra monarchdodra at gmail.com
Mon Dec 9 05:27:27 PST 2013


On Monday, 9 December 2013 at 12:32:36 UTC, Namespace wrote:
> On Monday, 9 December 2013 at 12:29:44 UTC, monarch_dodra wrote:
>> On Sunday, 8 December 2013 at 18:55:26 UTC, Namespace wrote:
>>> On Sunday, 8 December 2013 at 18:33:39 UTC, Joseph Rushton 
>>> Wakeling wrote:
>>>> On 08/12/13 19:18, thedeemon wrote:
>>>>> I just use
>>>>>  scope(exit) delete buf;
>>>>
>>>> Deprecated or at least disapproved of, no?
>>>
>>> Sadly yes.
>>
>> Unless I'm mistaken, the only thing that was deprecated was 
>> scoped as an attribute to variables.
>>
>> The scope *statement* is till valid, and one of D's more 
>> powerful arguments in "simple and exception safe programming".
>
> 'delete' was meant. ;)

*slaps face*


More information about the Digitalmars-d mailing list