Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIDIClient.disposeClient does not reset initialized class variable #1193

Open
sensestage opened this issue Sep 11, 2014 · 5 comments
Open

MIDIClient.disposeClient does not reset initialized class variable #1193

sensestage opened this issue Sep 11, 2014 · 5 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: class library SC class library
Milestone

Comments

@sensestage
Copy link
Contributor

As the subject says.
When you dispose a client, the initialized class var is not set to false, and hence a re-init is not actually creating a new client.

@scztt scztt added the bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. label Mar 14, 2015
@scztt scztt added this to the 3.7 milestone Mar 14, 2015
@scztt
Copy link
Contributor

scztt commented Mar 14, 2015

Fix is to set initialized = false and clear the various classvar's?

@sensestage
Copy link
Contributor Author

*disposeClient {
        _DisposeMIDIClient
        ^this.primitiveFailed
    }

To:

*disposeClient {
   initialized = false;
   prDisposeClient;
}

*prDisposeClient {
        _DisposeMIDIClient
        ^this.primitiveFailed
    }

But right now I am unsure if it would be wise to just dispose of the sources and destinations, I am not sure whether all that stuff gets freed properly in the primitive code.
A careful check should be made in all three primitive implementations (CoreMIDI, AlsaMIDI, and PortMIDI).

@adcxyz
Copy link
Contributor

adcxyz commented Jun 18, 2015

also, maybe safer to first do prDisposeClient, then set var to false, so you know the primitive worked.

 *disposeClient {
     this.prDisposeClient;
}
*prDisposeClient {
    _DisposeMIDIClient
    ^this.primitiveFailed
}

@sensestage
Copy link
Contributor Author

This is also fixed in #1571

@crucialfelix crucialfelix modified the milestones: 3.7.x, 3.8 Apr 7, 2016
@vivid-synth
Copy link
Member

Can this be closed?

@vivid-synth vivid-synth added the comp: class library SC class library label Aug 3, 2016
@nhthn nhthn modified the milestones: 3.8, 3.9 Jan 15, 2017
@nhthn nhthn modified the milestones: 3.9, 3.9.x Oct 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: class library SC class library
Projects
None yet
Development

No branches or pull requests

6 participants