winapi - If PostMessage Succeeded, is the message guaranteed to be processed by the window? -


i have background thread process data , want send result main window, window may destroyed before background thread exits.

i use postmessage deliver newly created objects (created in heap), if succeed, message processed main window surely?

if not, best practice kind of situation?

ps: concern when posting messages, window valid, destroyed before message delivered. if so, cannot delete objects.

i use postmessage deliver newly created objects (created in heap), if succeed, message processed main window surely?

if call postmessage succeeds, message placed in queue. message processed when thread pumps message queue. if thread fails pump queue, or if recipient window no longer exists when message processed, not delivered.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -