Changeset - f2d7db397cec
[Not reviewed]
0 2 0
HanzZ - 14 years ago 2011-08-26 11:47:28
hanzz.k@gmail.com
use pool allocator for roster manager
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
include/transport/rostermanager.h
Show inline comments
 
@@ -23,6 +23,8 @@
 
#include <string>
 
#include <algorithm>
 
#include <map>
 
#include <boost/pool/pool_alloc.hpp>
 
#include <boost/pool/object_pool.hpp>
 
#include "Swiften/Swiften.h"
 
// #include "rosterstorage.h"
 

	
 
@@ -100,7 +102,7 @@ class RosterManager {
 
		void sendRIE();
 
		void handleBuddyRosterPushResponse(Swift::ErrorPayload::ref error, const std::string &key);
 

	
 
		std::map<std::string, Buddy *> m_buddies;
 
		std::map<std::string, Buddy *, std::less<std::string>, boost::pool_allocator< std::pair<std::string, Buddy *> > > m_buddies;
 
		Component *m_component;
 
		RosterStorage *m_rosterStorage;
 
		User *m_user;
src/rostermanager.cpp
Show inline comments
 
@@ -63,6 +63,8 @@ RosterManager::~RosterManager() {
 
		delete buddy;
 
	}
 

	
 
	boost::singleton_pool<boost::pool_allocator_tag, sizeof(unsigned int)>::release_memory();
 

	
 
	if (m_rosterStorage)
 
		delete m_rosterStorage;
 
}
0 comments (0 inline, 0 general)