Changing and fixing some stuff
- QHash is better to use than QMap in MemoryManager: faster lookups, able to reserve memory in advance - Also: reserve memory in advance for the QVector and QHash, so we don't get needles allocs for them - No need to do cleanup for the nph manager, as it uses the generic manager for allocs, and that already gets cleaned up
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
#include <new>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QHash>
|
||||
#include "MemoryHelper.h"
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ struct PtrInfo
|
||||
};
|
||||
|
||||
typedef QVector<MemoryPool> MemoryPoolVector;
|
||||
typedef QMap<void*, PtrInfo> PointerInfoMap;
|
||||
typedef QHash<void*, PtrInfo> PointerInfoMap;
|
||||
|
||||
class MemoryManager
|
||||
{
|
||||
|
||||
@@ -330,7 +330,6 @@ public:
|
||||
NotePlayHandle::Origin origin = NotePlayHandle::OriginPattern );
|
||||
static void release( NotePlayHandle * nph );
|
||||
static void extend( int i );
|
||||
static void cleanup();
|
||||
|
||||
private:
|
||||
static NotePlayHandleList s_nphCache;
|
||||
|
||||
Reference in New Issue
Block a user