Memory allocation problems ?
Piet.Kerckhove at rug.ac.be
Mon Aug 12 13:03:40 EDT 2002
The steadystateGA inserts the offspring into the existing parentpopulation
then deletes the worst individuals till the popsize equals the given popsize
Hopefully this explains something...
Quoting Mukund Seshadri <mukund at WPI.EDU>:
> I'm using a ptr to an object in a GATreeGenome object and I'm having a
> memory leak. Now ideally I should have the ptr enclosed in an object that
> does all the checking and frees the memory when appropriate but having
> already commited myself to the simple pointer, I was wondering if I had to
> rewrite the program with a pointer class or maybe I could call an
> appropriate destructor.
> So I declared a GATreeGenome<MyNodePointer>::~GATreeGenome destructor but
> I find its not getting called.
> My program calls ga.step (for the GASStateGA) and I notice that the tmpPop
> is just replaced .. should it also be calling a delete or does that
> happens elsewhere ? Did I miss something ?
> -Mukund Seshadri
> galib mailing list
> galib at mit.edu
piet.kerckhove at rug.ac.be
More information about the galib