Project

General

Profile

Actions

Feature #1356

open

WApplication::bind() protection layer issue

Added by Rob Van Dyck almost 12 years ago. Updated about 11 years ago.

Status:
InProgress
Priority:
Normal
Assignee:
Target version:
-
Start date:
07/12/2012
Due date:
% Done:

0%

Estimated time:

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

main.cpp (3.53 KB) main.cpp Rob Van Dyck, 07/12/2012 01:48 PM
Actions #1

Updated by Rob Van Dyck almost 12 years ago

edit: define *CRASH

Actions #2

Updated by Rob Van Dyck almost 12 years ago

__CRASH__ ?

Actions #3

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

Actions

Also available in: Atom PDF