new D2.0 + C++ language

Weed resume755 at mail.ru
Fri Mar 20 09:28:09 PDT 2009


Simen Kjaeraas пишет:
> Weed <resume755 at mail.ru> wrote:
> 
>> Simen Kjaeraas пишет:
>>> Weed <resume755 at mail.ru> wrote:
>>>
>>>>> I think the point you're trying to make is that a GC is more memory
>>>>> intensive.
>>>>
>>>> + 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)
>>>
>>> Then use the stub GC or disable the GC, then re-enable it when
>>> you have the time to run a sweep (yes, you can).
>>>
>>     
>> Then a memory overrun
> 
> If so, you have allocated a lot of things you shouldn't have, or otherwise
> would have the same problem using manual allocation.
	 	
No, as far as I know that some pieces of language does not imply a
manual release memory. (See below)

>>>> A need language that does not contain a GC (or contains optional). Many
>>>> C++ programmers do not affect the D only because of this.
>>>
>>> While GC in D is not optional, it can be stubbed out or disabled,
>>
>> Then some part of the language will stop working (dynamic arrays, and
>> possibly delegates)
> 
> Yes. So don't use those parts,

It is not impossible without blocking at the compiler level (by CLI
option) in the real world.

> or disable the GC and enable it
> when you have the time.

Again, the memory will be overrun)



More information about the Digitalmars-d mailing list