22 messages in com.mysql.lists.plusplusRe: mysql++ memory usage| From | Sent On | Attachments |
|---|---|---|
| gani b. c. | 02 Oct 2006 01:11 | |
| Warren Young | 02 Oct 2006 12:18 | |
| Alex Burton | 02 Oct 2006 18:35 | |
| gani b. c. | 03 Oct 2006 00:09 | |
| Warren Young | 03 Oct 2006 16:17 | |
| Bill K | 03 Oct 2006 19:43 | |
| Alex Burton | 04 Oct 2006 03:30 | |
| Warren Young | 04 Oct 2006 06:10 | |
| Carlos Flores | 04 Oct 2006 07:41 | |
| Bill K | 04 Oct 2006 18:49 | |
| Warren Young | 05 Oct 2006 09:11 | |
| Alex Burton | 05 Oct 2006 18:24 | |
| Alex Burton | 05 Oct 2006 18:52 | |
| Matt Dargavel | 06 Oct 2006 04:32 | |
| Warren Young | 06 Oct 2006 13:38 | |
| Alex Burton | 06 Oct 2006 15:19 | |
| Warren Young | 06 Oct 2006 15:29 | |
| Matt Dargavel | 07 Oct 2006 07:47 | |
| Warren Young | 11 Oct 2006 15:46 | |
| Matt Dargavel | 19 Oct 2006 08:54 | |
| Warren Young | 20 Oct 2006 03:40 | |
| Matt Dargavel | 20 Oct 2006 07:43 |
| Subject: | Re: mysql++ memory usage![]() |
|---|---|
| From: | Matt Dargavel (ma...@shout-telecoms.com) |
| Date: | 10/07/2006 07:47:16 AM |
| List: | com.mysql.lists.plusplus |
Alex Burton wrote:
Warren,
Rather than doing a special case for VC++, could you just use the default constructor for std::ostream and then call init as before ? The only change being std::ostream(0) becomes std::ostream()
Unfortunately, there's no default constructor available for ostream in VC++.
The code in the default constructor for basic_ofstream would be worth a look in the relavent implementations of std c++ library, just do whatever they are doing ?
In VC++ for basic_ofstream they do what Alex initially did and pass a pointer to a member variable in.
Having trawled through the VC++ and gcc std lib source code a bit more, I think this might be the better solution (sorry Warren). Mainly because in the _Uninitialised::_NoInit constructor in VC++ it calls ios_base::_Addstd(this) whereas, unless you specify a second param of true, in the other constructor it doesn't. Unfortunately, I have no idea what _Addstd does, except that it's "special handling for standard streams". Also, taking this approach it's the same across platforms, even if it does rely on all implementations doing nothing with the pointer you pass in, except for storing it.




