Manual memory management in D2

Justin Johansson no at spam.com
Wed Jul 14 06:18:46 PDT 2010


Andrei Alexandrescu wrote:
> On 07/14/2010 01:15 AM, Kagamin wrote:
>> Andrei Alexandrescu Wrote:
>>
>>> most GC's cannot provide efficient manual reclamation. And they
>>> shouldn't anyway.
>>>
>> If one doesn't want to implement a function, he can throw
>> NotImplementedException, or don't provide the function so that
>> program using the delete won't link.
> 
> And how would you use such a feature effectively? I've seen such
> "optional implementation" policies in standards such as SQL 
> (compatibility levels) and C++ (export). They _always_ fare disastrously.
> 
>> But deallocation of allocated
>> memory is not that unthinkable just because it can be hard.
> 
> It's not about difficulty as much as constraining GC implementers 
> unnecessarily. Again: use a heap tuned for manual management to manage 
> memory manually, and a heap tuned for automatic management to manage 
> memory automatically. I think it's a very reasonable stance.
> 
> 
> Andrei

"use a heap tuned for manual management to manage memory manually ..."

So do I call in a piano tuner having both an ear for perfect pitch
and extreme programming skills at $blackmail per hour or do
I simply (knowledgeably) call in template meta-programming idioms for free?

Justin


More information about the Digitalmars-d mailing list