source:
source/ariba/utility/transport/messages/shared_buffer.cpp@
10688
Last change on this file since 10688 was 10673, checked in by , 12 years ago | |
---|---|
File size: 840 bytes |
Rev | Line | |
---|---|---|
1 | //----------------------------------------------------------------------------- | |
2 | // Part of reboost (http://reboost.org). Released under the | |
3 | // BSD 2-clause license (http://www.opensource.org/licenses/bsd-license.php). | |
4 | // Copyright 2012, Sebastian Mies <mies@reboost.org> --- All rights reserved. | |
5 | //----------------------------------------------------------------------------- | |
6 | ||
7 | #include "shared_buffer.hpp" | |
8 | #include <iostream> | |
9 | ||
10 | namespace reboost { | |
11 | ||
12 | using namespace std; | |
13 | ||
14 | #ifdef DEBUG | |
15 | ||
16 | void shared_buffer_t::onexit() { | |
17 | if (allocated_buffers != 0) | |
18 | cerr << "shared_buffer_t: " << allocated_buffers << " leaked buffers." << endl; | |
19 | } | |
20 | ||
21 | size_t shared_buffer_t::init() { | |
22 | atexit(&shared_buffer_t::onexit); | |
23 | return 0; | |
24 | } | |
25 | ||
26 | size_t shared_buffer_t::allocated_buffers = init(); | |
27 | boost::mutex shared_buffer_t::allocated_buffers_mutex; | |
28 | ||
29 | #endif //DEBUG | |
30 | ||
31 | } |
Note:
See TracBrowser
for help on using the repository browser.