mutex icon indicating copy to clipboard operation
mutex copied to clipboard

[fix] remove destructor in mutex

Open skalenji opened this issue 5 years ago • 2 comments

Mutex destructor is used to as a fail safe to release locks in case process is terminated unexpectedly, this is not really needed and could lead to errors * The actual lock provider responsible for releasing the lock could be destructed before the mutex, during shutdown there is no guarantee in order of which objects are destructed * All lock providers extend the LockAbstaract class which already has a destructor responsible for freeing locks in case of failure * Throwig exception in the destructor is not a good idea, doing so triggers a fatal error

skalenji avatar Aug 13 '18 17:08 skalenji

@arvenil can you check this please?

gpressutto5 avatar Dec 14 '21 23:12 gpressutto5

@skalenji You need to remove the destructor on NinjaMutex\Lock\LockAbstract too.

gpressutto5 avatar Dec 14 '21 23:12 gpressutto5