On Mon, 13 Dec 2004 09:01:01 -0800, Frank Maddin
We've been thinking about using certain boost functionality on a project. We were trying to keep the number of allocations down.
See the attached test program which makes the Hello class "noisy" and runs two different versions of your signals test. One uses object copy semantics and the other uses reference semantics. Compare the output: copy test: Hello::Hello () @ 0xbfffb950 Hello::Hello (const ref) @ 0xbfffb8c0 Hello::Hello (const ref) @ 0xbfffb870 Hello::Hello (const ref) @ 0xbfffb830 Hello::Hello (const ref) @ 0xbfffb7e0 Hello::Hello (const ref) @ 0x8050fb0 Hello::~Hello @ 0xbfffb7e0 Hello::~Hello @ 0xbfffb830 Hello::~Hello @ 0xbfffb870 Hello::~Hello @ 0xbfffb8c0 Hello::Hello (const ref) @ 0x8050fc0 Hello::Hello (const ref) @ 0x8050fc8 Hello::Hello (const ref) @ 0x8050fd0 Hello::~Hello @ 0x8050fc8 Hello::~Hello @ 0x8050fc0 Hello::~Hello @ 0x8050fb0 i = 1968 Hello::~Hello @ 0x8050fd0 Hello::~Hello @ 0xbfffb950 ref test: Hello::Hello () @ 0xbfffb950 i = 1968 Hello::~Hello @ 0xbfffb950 -- Caleb Epstein caleb dot epstein at gmail dot com