Opened 9 years ago

Closed 7 years ago

#8533 closed Tasks (fixed)

signal garbage collection of slot objects

Reported by: fmh6jj@… Owned by: Frank Mori Hess
Milestone: Boost 1.59.0 Component: signals2
Version: Boost 1.55.0 Severity: Optimization
Keywords: Cc:

Description

Some people find the garbage collection scheme used by signals to destroy their disconnected slot surprising, in that slot objects inside the signal are not necessarily destroyed promptly upon their disconnection. An alternative scheme would be to reference count the use of each slot object and destroy it when it is disconnected and no longer needed by any ongoing signal invocation. Care would need to be taken to avoid a heavy performance impact (we probably wouldn't want to add an atomic reference count, but rather rely on the existing signal mutex for thread saftey).

Change History (7)

comment:1 by julien.puydt@…, 8 years ago

Version: Boost 1.52.0Boost 1.55.0

It's still the case with 1.55, and is annoying when one tries to reclaim memory as soon as possible and detect issues with memory management at fixed points.

Is there a workaround?

comment:2 by dsandras@…, 8 years ago

We are really annoyed by this problem in the Ekiga project. What would you suggest ?

comment:3 by fmh6jj@…, 8 years ago

I'll try to get this change done sometime in the next week

comment:4 by dsandras@…, 8 years ago

Thanks !

What can we do to force the cleanup to happen until then?

Actually, when objects are destroyed when the process exits, we see all destructors are not called correctly because of this scheme.

comment:5 by fmh6jj@…, 8 years ago

If you destroy a signal, all the slot objects it contains are also destroyed (unless it is concurrently being invoked when it is destructed, in which case the signal's internals are destructed when invocation completes).

comment:6 by Frank Mori Hess, 8 years ago

Milestone: To Be DeterminedBoost 1.59.0
Status: newassigned

Fixed on develop branch

comment:7 by Frank Mori Hess, 7 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.