clear_messageT_clear_messageClearMessageClearMessageclear_message (Operator)
Name
clear_messageT_clear_messageClearMessageClearMessageclear_message
— Close a message handle and release all associated resources.
Signature
Description
clear_messageclear_messageClearMessageClearMessageClearMessageclear_message
closes a message handle MessageHandleMessageHandleMessageHandleMessageHandlemessageHandlemessage_handle
that
was previously opened with create_messagecreate_messageCreateMessageCreateMessageCreateMessagecreate_message
or
dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessagedequeue_message
. Any resources owned by the message, in particular
the tuple or object data stored in the message, will be released.
Multiple message handles can be closed in a single clear_messageclear_messageClearMessageClearMessageClearMessageclear_message
call, passing them as a tuple to the MessageHandleMessageHandleMessageHandleMessageHandlemessageHandlemessage_handle
parameter.
Attention
The handle(s) must not be used again after being invalidated using
clear_messageclear_messageClearMessageClearMessageClearMessageclear_message
. Using an invalid handle results in
undefined behavior.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
This operator modifies the state of the following input parameter:
During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.
Parameters
MessageHandleMessageHandleMessageHandleMessageHandlemessageHandlemessage_handle
(input_control, state is modified) message(-array) →
HMessage, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Message handle(s) to be closed.
Number of elements: MessageHandle >= 1
Restriction: MessageHandle != 0
Example (HDevelop)
MessageHandles := []
for idx := 0 to 4 by 1
create_message (MessageHandle)
MessageHandles[idx]:= MessageHandle
endfor
* ...
Result
If the message handle(s) passed to the operator are valid,
clear_messageclear_messageClearMessageClearMessageClearMessageclear_message
returns 2 (H_MSG_TRUE). Otherwise an exception is raised.
If a tuple of handles is passed and some of them are invalid,
clear_messageclear_messageClearMessageClearMessageClearMessageclear_message
attempts to clear as many handles from the tuple as
possible before reporting the error.
Possible Predecessors
create_messagecreate_messageCreateMessageCreateMessageCreateMessagecreate_message
,
dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessagedequeue_message
See also
create_messagecreate_messageCreateMessageCreateMessageCreateMessagecreate_message
,
set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleSetMessageTupleset_message_tuple
,
get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTupleget_message_tuple
,
set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObjset_message_obj
,
get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObjget_message_obj
,
set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParamset_message_param
,
get_message_paramget_message_paramGetMessageParamGetMessageParamGetMessageParamget_message_param
,
enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessageenqueue_message
,
dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessagedequeue_message
Module
Foundation