Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5a7bd55a authored by hhakim's avatar hhakim
Browse files

Add RefManager::print_refs().

parent 9bb967de
No related branches found
No related tags found
No related merge requests found
......@@ -62,3 +62,13 @@ Faust::RefManager::RefManager(void(*cb)(void*))
{
set_free_cb(cb);
}
void Faust::RefManager::print_refs()
{
std::cout << "number of refs managed: " << refCounts.size() << std::endl;
for(map<void*, unsigned int>::const_iterator it = refCounts.begin();
it != refCounts.end(); ++it)
{
std::cout << "address: " << it->first << " ref counts:" << it->second << std::endl;
}
}
......@@ -17,6 +17,11 @@ namespace Faust {
void set_free_cb(void (*cb)(void*));
/**
* Prints all managed addresses with their references count.
*/
void print_refs();
RefManager();
RefManager(void(*cb)(void*));
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment