今後スレ

a8f09cbb :one^ 2006-03-11 22:02
>> 空きメモリが少ない場合はそれに合わせてちゃんと開放されるはず。
その判断が大きすぎるのか、PCが固まるまで増え続けるのです・・。

>>393ad2ba
> delete してもメモリが解放されるとは限らない。保証されているのは
>デストラクタが呼び出されることだけ。
いや、消されるはず・・。

// Delete式↓
>>http://www.kmonos.net/alang/d/expression.html#DeleteExpression
> Delete式は、ガベージコレクタの割り当てたヒープからメモリを解放するか、
> クラス/構造体特有のデアロケータを呼び出します。

// でかいメモリをGCが開放しないなら明示的にdeleteしろいう話↓
>>http://www.digitalmars.com/d/archives/digitalmars/D/bugs/6037.html
>Garbage collection tends to come unglued with allocations that are large
>relative to the address space. The best way to deal with this is to handle
>such large allocations explicitly, i.e. explicitly delete them when the
>program is done with them.

>Or, you can only access the large chunk through a small class. Then, in the
>destructor for the small class, explicitly delete the large chunk.
Powered by shinGETsu.