Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
clear() -> destroy().
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Jul 10, 2012
1 parent c1d7164 commit 21579a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/sync/rwmutex.d
Expand Up @@ -95,17 +95,17 @@ class ReadWriteMutex
m_commonMutex = new Mutex;
if( !m_commonMutex )
throw new SyncException( "Unable to initialize mutex" );
scope(failure) { clear(m_commonMutex); GC.free(cast(void*)m_commonMutex); }
scope(failure) { destroy(m_commonMutex); GC.free(cast(void*)m_commonMutex); }

m_readerQueue = new Condition( m_commonMutex );
if( !m_readerQueue )
throw new SyncException( "Unable to initialize mutex" );
scope(failure) { clear(m_readerQueue); GC.free(cast(void*)m_readerQueue); }
scope(failure) { destroy(m_readerQueue); GC.free(cast(void*)m_readerQueue); }

m_writerQueue = new Condition( m_commonMutex );
if( !m_writerQueue )
throw new SyncException( "Unable to initialize mutex" );
scope(failure) { clear(m_writerQueue); GC.free(cast(void*)m_writerQueue); }
scope(failure) { destroy(m_writerQueue); GC.free(cast(void*)m_writerQueue); }

m_policy = policy;
m_reader = new Reader;
Expand Down

0 comments on commit 21579a5

Please sign in to comment.