fdix minor buglet

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38774 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2015-07-09 11:44:20 +00:00
parent 73c1258d5a
commit bd7a7fd0e4
3 changed files with 10 additions and 9 deletions

View file

@ -2,6 +2,8 @@
* Source/NSDebug.m: List memory allocation statistics in alphabetical
order (by class name) for easier interpretation.
Fix bug where the counter for differences was updated when difference
listing was not requested.
2015-07-08 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -170,14 +170,13 @@ GS_EXPORT int GSDebugAllocationTotal(Class c);
GS_EXPORT Class* GSDebugAllocationClassList(void);
/**
* This function returns a newline
* separated list of the classes which have instances
* allocated, and the instance counts. If the 'changeFlag'
* argument is YES then the list gives the number of
* instances allocated/deallocated since the function was
* last called. This function only returns the current count
* of instances (not the peak or total count), but its output
* is ready to be displayed or logged.
* This function returns a newline separated list of the classes
* which have instances allocated, and the instance counts.
* If the 'changeFlag' argument is YES then the list gives the number
* of instances allocated/deallocated since the function was
* last called with that setting. This function only returns the
* current count of instances (not the peak or total count), but its
* output is ready to be displayed or logged.
*/
GS_EXPORT const char* GSDebugAllocationList(BOOL changeFlag);

View file

@ -545,8 +545,8 @@ _GSDebugAllocationFetch(list_entry *items, BOOL difference)
if (difference)
{
val -= the_table[i].lastc;
the_table[i].lastc = the_table[i].count;
}
the_table[i].lastc = the_table[i].count;
if (val)
{
items[pos].name = class_getName(the_table[i].class);