Author: Stan Eisenstat
Subject: Re: [Cs223] Memory leaking in Deque.c
Date: Monday, 30 Mar 2020, 07:24:53
> Message Posted By: Unknown > > Valgrind tells me that there's memory leakage when I try to run testDeque > on my Deque.c (in particular when I run Cd, Ad, Dd). Otherwise, it seems > to be working. Do I have to worry about it and try to fix this problem? That sequence destroys the Deque when it is nonempty. Since, as stated in the specification, destroyD() must // Destroy the Deque *D by freeing any storage that it uses (but not the // blocks of storage to which the string pointers point) and set the value // of *D to NULL. the storage for the line still stored in the Deque is NOT freed, and valgrind will report it as still in use. If that is the ONLY such storage reported, then you do not need to fix the problem. --Stan-PREV INDEX NEXT