well i ran into something i thought i could have gotten around, the new and delete operators... lol
well i need a delete operator, any ideas? i really haven't seen many around to even learn from
thanks in advance soo much!
delete ? new ??
Re:delete ? new ??
Code: Select all
void operator delete (void* p) { free(p); }
Re:delete ? new ??
Code: Select all
operator new(size_t size)
{
return malloc(size);
}
operator new[](size_t size)
{
return malloc(size);
}
operator delete(void *p)
{
free(p);
}
operator delete[](void *p)
{
free(p);
}
Re:delete ? new ??
No offense, Tim, but that answer only helps if Gtsphere has already written a memory mangler and implemented malloc() and free() based on it.
Then again, GTS seems to be OK with this answer (or at least hasn't complained about it), so perhaps he has.
It's issues like this that make me want to use a garbage-collecting system for the code outside of the kernel proper.
Then again, GTS seems to be OK with this answer (or at least hasn't complained about it), so perhaps he has.
It's issues like this that make me want to use a garbage-collecting system for the code outside of the kernel proper.