mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 11:59:58 -05:00
Initial community commit
This commit is contained in:
24
Src/Wasabi/api/wndmgr/gc.cpp
Normal file
24
Src/Wasabi/api/wndmgr/gc.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <precomp.h>
|
||||
#include "gc.h"
|
||||
|
||||
GarbageCollector *garbageCollector=NULL;
|
||||
|
||||
GarbageCollector::GarbageCollector() {
|
||||
last = 0;
|
||||
WASABI_API_SYSCB->syscb_registerCallback(this);
|
||||
}
|
||||
|
||||
GarbageCollector::~GarbageCollector() {
|
||||
WASABI_API_SYSCB->syscb_deregisterCallback(this);
|
||||
}
|
||||
|
||||
int GarbageCollector::gccb_onGarbageCollect() {
|
||||
uint32_t tc = Wasabi::Std::getTickCount();
|
||||
if (tc < last + 10000) return 0;
|
||||
|
||||
last = tc;
|
||||
#ifdef WIN32
|
||||
//SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user