Re: [Boost-users] Boost-users Digest, Vol 2718, Issue 1

Actually, My intention is to pass a shared_ptr, as against a raw ptr. The purpose is that after execting the callback, the shared_ptr can go out of scope, and ensure object deletion on its own, without having to call an explicit delete.
So, I really wanted to pass a shared_ptr to the callback fn, as a void*.
The reason behind this is...
- i have a 3rd party timer engine, which accepts a callback function and callback args.
- On timer expiry, it calls my regd callback implmentation, along with the args passed in its start_timer function.
- Earlier, I was passing an object* to the callback args of the timer.
- If the timer event fires, my callback impl gets called, and I get a chance to do a "delete", which is fine.
- In some cases, I have to cancel / stop the timer. And then since, my callback doesn't fire, I have no way to delete the obj*, and results in a memory leak.
So, I wanted to pass a shared_ptr itself as the callback argument for my 3rd party timer. So that, even if timer doesn't fire, my object won't leak.
regards,
RV
________________________________
From: "boost-users-request@lists.boost.org"
Hi I am using boost serialization and it was working fine (save load works) but then I tried using BOOST_CLASS_EXPORT_GUID and get weird error.
The line that gives the error is this:
BOOST_CLASS_EXPORT_GUID( Bakery, "Bakery")
(I put the code in Cpp to avoid any problems with headers.)
And this is the full Visual studio express 2010 error:
2>E:\boost_1_46_1\boost/archive/detail/check.hpp(162): error C2338: typex::value
...
what does the code look like at line 162 of check.hpp ?
Robert Ramey
------------------------------
Message: 2
Date: Tue, 10 May 2011 10:45:04 +0400
From: Vladimir Prus
Hi all. I have a question regarding boost.program_options.
I want to parse a command-line but I want to know the order in which each option appeared in the command line. Is this possible? Thanks in advance.
parse_command_line returns vector< basic_option<charT> >, which
are in the order of occurence. This is a point where you can do
logic based on the order. variables_map does not store order
information.
HTH,
--
Vladimir Prus
Mentor Graphics
+7 (812) 677-68-40
------------------------------
Message: 3
Date: Tue, 10 May 2011 13:26:09 +0530 (IST)
From: Mupparthy Ravindranath
participants (1)
-
Mupparthy Ravindranath