Re: Explicitly Freeing Memory

2014-11-19 Thread Maxime Chevalier-Boisvert via Digitalmars-d-learn
Unfortunately I don't have any good suggestions... I have been avoiding depending on dtors in D because of the aforementioned issues (and more), so I haven't had much experience in debugging dtor-related problems in D. I decided to just free everything explicitly:

Re: Explicitly Freeing Memory

2014-11-19 Thread Kagamin via Digitalmars-d-learn
You can control it by creating a global flag and checking it before freeing.

Explicitly Freeing Memory

2014-11-18 Thread Maxime Chevalier-Boisvert via Digitalmars-d-learn
I posted a thread the other day explaining that I was running into a memory leak issue which is very hard to debug. There seems to be a false pointer somewhere, and I have no way of knowing where that is or which object is being pointed to. I decided to take the easy way out and explicitly

Re: Explicitly Freeing Memory

2014-11-18 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Nov 19, 2014 at 03:47:03AM +, Maxime Chevalier-Boisvert via Digitalmars-d-learn wrote: [...] I'm trying to explicitly free chunks of memory allocated with GC.malloc() in a destructor. This works fine while the program is running, but when the program terminates, it seems the GC

Re: Explicitly Freeing Memory

2014-11-18 Thread Vladimir Panteleev via Digitalmars-d-learn
On Wednesday, 19 November 2014 at 03:47:04 UTC, Maxime Chevalier-Boisvert wrote: I posted a thread the other day explaining that I was running into a memory leak issue which is very hard to debug. There seems to be a false pointer somewhere, and I have no way of knowing where that is or which