Opened 9 years ago
Closed 7 years ago
#8533 closed Tasks (fixed)
signal garbage collection of slot objects
Reported by: | 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 , 8 years ago
Version: | Boost 1.52.0 → Boost 1.55.0 |
---|
comment:2 by , 8 years ago
We are really annoyed by this problem in the Ekiga project. What would you suggest ?
comment:4 by , 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 , 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 , 8 years ago
Milestone: | To Be Determined → Boost 1.59.0 |
---|---|
Status: | new → assigned |
Fixed on develop branch
comment:7 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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?