R
RJGraham
Hello,
I have a C++ application where I create a message object and pass it along
to different threads for processing.
How can I manage the destruction of this message so that it is automatically
deleted when the last thread or process is done with it?
I suppose the simplest approach might be to clone the object before passing
it along, and make each object that receives this object responsible for its
destruction.
I think a smart pointer might solve this problem, can someone recommend an
implementation?
As you've probably already figured out, I don't know much about smart
pointers ...
-Randy
I have a C++ application where I create a message object and pass it along
to different threads for processing.
How can I manage the destruction of this message so that it is automatically
deleted when the last thread or process is done with it?
I suppose the simplest approach might be to clone the object before passing
it along, and make each object that receives this object responsible for its
destruction.
I think a smart pointer might solve this problem, can someone recommend an
implementation?
As you've probably already figured out, I don't know much about smart
pointers ...
-Randy