[omniORB] Memory management for detached omni threads
Duncan Grisby
duncan at grisby.org
Fri Mar 14 12:06:24 UTC 2025
On Thu, 2025-03-13 at 21:01 +0100, Thomas Braun via omniORB-list wrote:
> auto *th = new DelayedEventSubThread(...);
> th->start();
> // th goes out of scope
>
> with the declaration
>
> class DelayedEventSubThread : public omni_thread
> {
> public:
> DelayedEventSubThread(...);
>
> void run(void *) override;
>
> // ...
> }
>
> Now from my reading of [1] I'd say that this is a detached omni
> thread,right?
Yes.
> But what I don't understand is why this does not leak memory?
Because when the thread exits, the omni_thread object is deleted.
Duncan.
--
-- Duncan Grisby
-- duncan at grisby.org
-- https://www.grisby.org/
More information about the omniORB-list
mailing list