new D2.0 + C++ language

Christopher Wright dhasenan at gmail.com
Fri Mar 20 05:05:37 PDT 2009


Weed wrote:
> Christopher Wright пишет:
>> Weed wrote:
>>> + Sometimes allocation and freeing of memory in an arbitrary
>>> unpredictable time  unacceptable. (in game development or realtime
>>> software, for example. One hundred million times discussed about it
>>> there, I guess)
>> So you are optimizing for the uncommon case?
> 
> GC is an attempt of optimizing for the uncommon case )

I don't think so. Programmers have more important things to do than 
write memory management systems. My boss would not be happy if I 
produced an application that leaked memory at a prodigious rate, and he 
would not be happy if I spent much time at all on memory management.

With the application I develop at work, we cache some things. These 
would have to be reference counted or deleted and recomputed every time. 
Reference counting is a lot of tedious developer effort. Recomputing is 
rather expensive. Deleting requires tedious developer effort and 
determining ownership of everything. This costs time and solves no 
problems for the customers.

And the best manual memory management that I am likely to write would 
not be faster than a good garbage collector.

What sort of applications do you develop? Have you used a garbage 
collector in a large application?



More information about the Digitalmars-d mailing list