app_server/BitmapManager: fix memory leak caused by missing token remove
`BTokenSpace::NewToken` put all allocated tokens into `fTokenMap` so `BTokenSpace::RemoveToken` should be called for tokens that become unused to avoid infinite `fTokenMap` growth. Change-Id: I0aee709234143ceaf4416d63b38fb2a26eb8f891 Reviewed-on: https://review.haiku-os.org/c/haiku/+/7417 Reviewed-by: Axel Dörfler <axeld@pinc-software.de> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
0e268215f3
commit
d72ca12e19
|
@ -228,6 +228,8 @@ BitmapManager::BitmapRemoved(ServerBitmap* bitmap)
|
|||
if (!locker.IsLocked())
|
||||
return;
|
||||
|
||||
gTokenSpace.RemoveToken(bitmap->Token());
|
||||
|
||||
if (bitmap->Overlay() != NULL)
|
||||
fOverlays.RemoveItem(bitmap);
|
||||
|
||||
|
|
Loading…
Reference in New Issue