Main Content

cancelDestroy

Class: matlab.DiscreteEventSystem
Namespace: matlab

Cancel previously scheduled entity destroy event

Syntax

event=cancelDestroy()

Description

event=cancelDestroy() cancels a previously scheduled destroy event of the current entity. You can then schedule this event by returning it as the output argument when implementing an event action method, such as entry or exit.

Output Arguments

expand all

Event for cancelling entity destroy.

Examples

expand all

Cancel the previously scheduled destroy event of the entity in the current event action context.

function [entity,events] = timer(obj,storage,entity,tag)
    % Cancel the previously scheduled destroy event of the entity in
    % current event action context.
    event = obj.cancelDestroy();
end

Version History

Introduced in R2016a