mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
WeakRef
This commit is contained in:
@ -36,7 +36,7 @@ namespace Esiur.Resource
|
||||
|
||||
public virtual void Destroy()
|
||||
{
|
||||
|
||||
OnDestroy?.Invoke(this);
|
||||
}
|
||||
|
||||
public virtual AsyncReply<bool> Trigger(ResourceTrigger trigger)
|
||||
@ -51,5 +51,10 @@ namespace Esiur.Resource
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
~Resource()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user