Skip to content

Commit

Permalink
Destroy connection pool groups when connection pool is destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jul 8, 2015
1 parent 30daef0 commit 7f5b5fe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/core/qgsconnectionpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,17 @@ class QgsConnectionPool

typedef QMap<QString, T_Group*> T_Groups;

virtual ~QgsConnectionPool()
{
mMutex.lock();
foreach ( T_Group* group, mGroups )
{
delete group;
}
mGroups.clear();
mMutex.unlock();
}

//! Try to acquire a connection: if no connections are available, the thread will get blocked.
//! @return initialized connection or null on error
T acquireConnection( const QString& connInfo )
Expand Down

0 comments on commit 7f5b5fe

Please sign in to comment.