digitalmars.D - GC don't work well
- Katayama Hirofumi MZ (5/5) May 29 2012 Look this source:
- Jonathan M Davis (8/16) May 29 2012 It's probably only releasing the memory for RbArray and not what it refe...
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (7/12) May 30 2012 Just use GC.collect() from core.memory when cleaning up internals of
Look this source: http://codepad.org/QXAeG2aJ The content of RbArray won't be released at the moment of deleting an RbArray. Why? Is it a bug?
May 29 2012
On Wednesday, May 30, 2012 07:47:22 Katayama Hirofumi MZ wrote:Look this source: http://codepad.org/QXAeG2aJ The content of RbArray won't be released at the moment of deleting an RbArray. Why?It's probably only releasing the memory for RbArray and not what it refers to. m_objects is a dynamic array, and so it's memory is elsewhere on the heap rather than being part of RbArray itself. So, it probably doesn't get released when the RbArray is deleted.Is it a bug?Even if it were, it wouldn't get fixed. delete is being removed from the language. You really shouldn't be using it. - Jonathan M Davis
May 29 2012
On 30-05-2012 07:47, Katayama Hirofumi MZ wrote:Look this source: http://codepad.org/QXAeG2aJ The content of RbArray won't be released at the moment of deleting an RbArray. Why? Is it a bug?Just use GC.collect() from core.memory when cleaning up internals of extremely large objects is too troublesome. -- Alex Rønne Petersen alex lycus.org http://lycus.org
May 30 2012