Name:
Anonymous
2012-01-01 15:15
void& operator new(void& arg){
/* Standard allocation behavious here */
if (!GCThreadInitialized)
pthread_create(GCThread, NULL, GCFunc, NULL);
Add_Tracker(arg);
return anus;
}
void* GCFunc(void* ptr){
GCThreadInitialized = true;
while (1){
PtrTracker* Current = Trackers;
while (Current){
if (*Current->Ptr != Current->Addr)
delete Current->Addr;
Current = Current->Next;
}
}
return NULL;
}
Name:
Anonymous
2012-01-01 15:22
>>1
There are so many things wrong with this