 
     deinit {
         pthread_cond_destroy(self.cond)
-        self.cond.destroy()
+        self.cond.dealloc(sizeof(pthread_cond_t))
         _IDGenerator.sharedInstance.freeID(self.id)
     }
 


    private func validateAndCommit() -> Bool {
        var res = true
        
        if thereIsNoReads {
            withMutexDo(_BigSTMLock.sharedInstance.lock) {self.commitAllTVars()}
        } else {

    
    deinit {
        pthread_mutex_destroy(self.lock)
        self.lock.dealloc(sizeof(pthread_mutex_t))
    }
    
    class var sharedInstance : _IDGenerator {
