boostorg / boostorg/smart_ptr

Deferred object destruction for shared_ptr

Open
#111 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
111
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Once during profiling, I noticed that deletion has major performance impact.
Since I don't rely on object under shared_ptr destruction end, I decided to defer the destruction to increase overall performance of getting results.
My solution looks like this: `void DispatchDispose(std::shared_ptr&&);`: https://github.com/ohhmm/openmind/blob/d2a58112b8e341e8733466e9710feb2ce11d882d/omnn/rt/GC.h#L19

My thought was about that in fact hardly anyone rely on last shared_ptr deletion end to continue code execution. Its only goal is to cleanup resource, but it does not matter when.

I guess that may be useful to have resource cleanup governors for shared_ptr or new kind of smart pointers for this.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.