Skip to content
Snippets Groups Projects
Commit 41e965d7 authored by Bernardo Cardoso's avatar Bernardo Cardoso
Browse files

Add DeleteCmix function needed by xxdk-wasm

parent d7cefd3a
No related branches found
No related tags found
1 merge request!703Some changes for Phoenixx
......@@ -220,6 +220,15 @@ func GetCMixInstance(instanceID int) (*Cmix, error) {
return instance, nil
}
func DeleteCmixInstance(instanceID int) error {
_, ok := cmixTrackerSingleton.tracked[instanceID]
if !ok {
return errors.Errorf("no cmix instance id: %d", instanceID)
}
cmixTrackerSingleton.delete(instanceID)
return nil
}
// cmixTracker is a singleton used to keep track of extant Cmix objects,
// preventing race conditions created by passing it over the bindings.
type cmixTracker struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment