OmniThreadLibrary icon indicating copy to clipboard operation
OmniThreadLibrary copied to clipboard

When i an object destroyed (or rather released) when send using Task.Comm.Send()?

Open GerbenAbbink opened this issue 7 years ago • 0 comments

Hi,

I send an object from a thread to the main thread like this:

var U: IUnknown; ... Task.Comm.Send(MESSAGE_ID, U);

I need to destroy all the objects before the thread ends. Normally, this is not the case: some objects are destroyed after the thread has ended.

I tried Task.Comm.Reader.Empty() and Task.Command.Writer.Empty() but with no success.

How can i force OmniThread to release the objects before the thread ends?

GerbenAbbink avatar May 08 '17 18:05 GerbenAbbink