Correct test for global shared_ptr variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10343 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
36e9ba403f
commit
a37115f55d
5 changed files with 13 additions and 17 deletions
|
|
@ -24,12 +24,12 @@ namespace SharedPtrWrapper {
|
|||
|
||||
template<typename T> void increment(boost::shared_ptr<T>* ptr) {
|
||||
SwigExamples::Lock lock(critical_section);
|
||||
std::cout << ptr << " " << show_message(ptr) << " " << " +" << std::endl << std::flush;
|
||||
std::cout << "====SharedPtrWrapper==== + " << ptr << " " << show_message(ptr) << " " << std::endl << std::flush;
|
||||
total_count++;
|
||||
}
|
||||
template<typename T> void decrement(boost::shared_ptr<T>* ptr) {
|
||||
SwigExamples::Lock lock(critical_section);
|
||||
std::cout << ptr << " " << show_message(ptr) << " " << " -" << std::endl << std::flush;
|
||||
std::cout << "====SharedPtrWrapper==== - " << ptr << " " << show_message(ptr) << " " << std::endl << std::flush;
|
||||
total_count--;
|
||||
}
|
||||
static int getTotalCount() { return total_count; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue