mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
dtoolbase: Fix small memory leak in NeverFreeMemory
It's using a set purely keyed by number of remaining bytes, so if there are two pages with the exact same number of remaining bytes, one of them gets lost. See #1077
This commit is contained in:
parent
b5c857c73f
commit
74983d19a4
@ -80,7 +80,11 @@ Page(void *start, size_t size) :
|
|||||||
*/
|
*/
|
||||||
INLINE bool NeverFreeMemory::Page::
|
INLINE bool NeverFreeMemory::Page::
|
||||||
operator < (const NeverFreeMemory::Page &other) const {
|
operator < (const NeverFreeMemory::Page &other) const {
|
||||||
|
if (_remaining != other._remaining) {
|
||||||
return _remaining < other._remaining;
|
return _remaining < other._remaining;
|
||||||
|
} else {
|
||||||
|
return _next < other._next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user