Rework logging of unfreed C4Strings a bit

scancodes-fix
Sven Eberhardt 2013-03-19 00:29:20 +01:00
parent 9e9e05f492
commit b0a0d2a83c
1 changed files with 12 additions and 1 deletions

View File

@ -177,9 +177,20 @@ C4StringTable::~C4StringTable()
for (C4String * const * s = Set.First(); s; s = Set.Next(s))
{
if (*s >= &Strings.P[0] && *s < &Strings.P[P_LAST])
fprintf(stderr, " \"%s\" %d\n", (*s)->GetCStr(), (*s)->RefCnt);
{
if ((*s)->RefCnt != 1)
#ifdef _WIN32
OutputDebugString(FormatString(" \"%s\" %d\n", (*s)->GetCStr(), (*s)->RefCnt).GetWideChar());
#else
fprintf(stderr, " \"%s\" %d\n", (*s)->GetCStr(), (*s)->RefCnt);
#endif
}
else
#ifdef _WIN32
OutputDebugString(FormatString("\"%s\" %d\n", (*s)->GetCStr(), (*s)->RefCnt).GetWideChar());
#else
fprintf(stderr, "\"%s\" %d\n", (*s)->GetCStr(), (*s)->RefCnt);
#endif
}
}
#endif