moved invalidation into sycnhronized block
This commit is contained in:
parent
325ad04c7e
commit
4ec5e9994f
|
@ -221,8 +221,8 @@ public final class ALC10 {
|
|||
*/
|
||||
public static boolean alcCloseDevice(ALCdevice device) {
|
||||
boolean result = nalcCloseDevice(getDevice(device));
|
||||
device.setInvalid();
|
||||
synchronized (devices) {
|
||||
device.setInvalid();
|
||||
devices.remove(new Long(device.device));
|
||||
}
|
||||
return result;
|
||||
|
@ -253,8 +253,8 @@ public final class ALC10 {
|
|||
ALCcontext context = new ALCcontext(context_address);
|
||||
synchronized (ALC10.contexts) {
|
||||
contexts.put(new Long(context_address), context);
|
||||
}
|
||||
device.addContext(context);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
return null;
|
||||
|
@ -356,9 +356,11 @@ public final class ALC10 {
|
|||
* @param context address of context to Destroy
|
||||
*/
|
||||
public static void alcDestroyContext(ALCcontext context) {
|
||||
synchronized(ALC10.contexts) {
|
||||
nalcDestroyContext(getContext(context));
|
||||
context.setInvalid();
|
||||
}
|
||||
}
|
||||
native static void nalcDestroyContext(long context);
|
||||
|
||||
/**
|
||||
|
|
|
@ -109,8 +109,8 @@ public final class ALC11 {
|
|||
*/
|
||||
public static boolean alcCaptureCloseDevice(ALCdevice device) {
|
||||
boolean result = nalcCaptureCloseDevice(ALC10.getDevice(device));
|
||||
device.setInvalid();
|
||||
synchronized (ALC10.devices) {
|
||||
device.setInvalid();
|
||||
ALC10.devices.remove(new Long(device.device));
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue