On Sun, Nov 13, 2011 at 16:29, Barry Smith <bsmith at mcs.anl.gov> wrote:
> I have PETSC_OPTIONS set in my .bashrc file to -malloc -malloc_debug > -malloc_dump by default. > > This means when I introduce memory leaks I find them immediately. Like > someone just introduced in src/dm/examples/test/ex30.c but did not detect > because they did not have these options set. > This is my fault. In DMDestroy(), there is somewhat strange logic to count the number of circular references in the "gotten" vectors. DMSliced clones new Vecs off of it's own private Vec, which has yet another circular reference. Should we just artificially decrement the reference count on the DM, and then re-reference it in DMDestroy_Sliced before destroying slice->globalvector? I wonder if there is a more elegant way to handle these circular references. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111113/1ee9e95f/attachment.html>
