Open topic with navigation

TIBCO Rendezvous® 8.8.0

# TibrvEvent::destroy()

Method

## Declaration

    virtual TibrvStatus destroy(
        TibrvEventOnComplete* completeCB = NULL);

## Purpose

Destroy an event, canceling interest.

## Remarks

Destroying an event object cancels interest in it. Upon return from TibrvEvent::destroy(), the destroyed event is no longer dispatched. However, all active callback methods of this event continue to run and return normally, even though the event is invalid.

It is legal for an event callback method to destroy its own event argument.

Destroying event interest invalidates the event object; subsequent API calls involving the invalid event return error status, unless explicitly documented to the contrary.

This method also destroys the C event handle embedded in the C++ event object.

Although TibrvEvent::destroy() prevents future dispatch calls from running the destroyed event’s callback method, that callback method might be already running in one or more threads that dispatch events from the same queue. In each thread where the callback method is already in progress, that callback method does continue to run until complete. Rendezvous software ensures that the completion method runs when the last callback-in-progress has completed; for important details, see TibrvEventOnComplete::onComplete().

Parameter | Description
`completeCB` | Rendezvous software runs the completion callback method immediately after all instances of the event’s callback method have completed. If the event’s callback method is not running when the event is destroyed, the destroy call runs it before returning. If this parameter is `NULL`, TibrvEvent::destroy() does not trigger a completion method.

## See Also

TibrvEvent::isValid()

TibrvEventOnComplete

tibrvEvent_Destroy() in TIBCO Rendezvous C Reference

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.