Feature #1356
openWApplication::bind() protection layer issue
0%
Description
Hi,
I wanted to use the added protection layer of WApplication::bind() so my objects would not be deleted. I tried this with a small attached test case. This test case works when WApp::binding an WObject method, but did not work when WApp::binding a boost::function that was boost::binded to a WObject::method.
This compiles and runs, but fails to trigger the protection layer. To simulate this in the test case, define CRASH.
Untill now I used my own protection layer. I have a messenger object with a boost::signals2::signal that tracks the object that I want to call a method on. I would then do a server::post on the messenger object method that calls its signal which would trigger only in case the object still exist.
FYI: I'm using Wt 3.2.1 and boost 1.46.1.
Kind regards,
Rob.
Files
Updated by Koen Deforche about 11 years ago
- Tracker changed from Bug to Feature
- Status changed from New to InProgress
- Assignee set to Koen Deforche
Hey,
As per a forum discussion, this requires extending boost::bind() to allow passing in arguments, which probably requires some (or a great deal of) template hacking ...
Regards,
koen