Boost logo

Boost Users :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2004-12-15 09:17:54


On Mon, 13 Dec 2004 09:01:01 -0800, Frank Maddin <frankmad_at_[hidden]> wrote:

> 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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net