Module for manual memory management

Foo via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 31 02:04:05 PST 2015


On Saturday, 31 January 2015 at 01:07:21 UTC, Andrei Alexandrescu 
wrote:
> On 1/30/15 3:49 PM, Foo wrote:
>> Is there interest in such a thing?
>> I'm currently working on something for my own use and I'm 
>> curious if
>> anyone else would be interested in something like that.
>> I'm aware of Unique, RefCounted, Scoped, emplace and so on, 
>> but I'm not
>> a big fan of some implementations (in my opinion not much of 
>> it follows
>> the KISS principle). Also, as far as I remember, RefCounted 
>> and Unique
>> are somewhat outdated.
>> As said I'm just curious and I'm aware that my code may be 
>> somewhat
>> un-phobos like.
>>
>> My current stand is this: http://dpaste.dzfl.pl/f1423322b7d5
>> Just to make it clear: m3 = manual memory management = mmm = m3
>>
>> and here is some test code: http://dpaste.dzfl.pl/026013fbe19f
>>
>> I repeat: I know that I reimplement some logic like emplace 
>> and that my
>> version is shorter but maybe not quite correct/incomplete.
>
> So why come with your own self-admitted incomplete/incorrect 
> alternatives instead of adding/improving the standard ones? If 
> something's there that shouldn't, remove it. I don't get this 
> "I didn't get it so I'll redo it incompletely".
>
>> And I'm also aware of std.allocator and so on, but that is 
>> something
>> different IMO.
>
> Agreed.
>
>
> Andrei

And I did not literally said 'incorrect'. I said _maybe_ 
incomplete. In my tests it works properly. What I meant with 'not 
quite correct' was that it isn't well tested _yet_. But that can 
be done later.


More information about the Digitalmars-d mailing list