Closed dm-tesla closed 2 months ago
Hello,
The Job
class doesn't have any virtual functions on purpose. There's only 1 way it can be destroyed: JobSystem::FreeJob
so you can free it like:
void MyJobSystem::FreeJob(Job *inJob)
{
delete static_cast<JobImpl *>(inJob);
}
I see, thank you for the answer! Closing the issue. I wish there was a way to guard against that properly. Seeing all those leaks wasn't expected.
This is needed to prevent leaks from user-derived jobs. For example:
In this case, the
internal_string
will not be automatically freed.