|
From: <ma...@us...> - 2007-05-19 20:47:55
|
Revision: 2823
http://svn.sourceforge.net/java-game-lib/?rev=2823&view=rev
Author: matzon
Date: 2007-05-19 13:47:53 -0700 (Sat, 19 May 2007)
Log Message:
-----------
remove context from the devices list of context on context destroy
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java
trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java
Modified: trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java 2007-05-19 20:40:04 UTC (rev 2822)
+++ trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java 2007-05-19 20:47:53 UTC (rev 2823)
@@ -359,6 +359,8 @@
synchronized(ALC10.contexts) {
nalcDestroyContext(getContext(context));
context.setInvalid();
+ ALCdevice device = alcGetContextsDevice(context);
+ device.removeContext(context);
}
}
native static void nalcDestroyContext(long context);
Modified: trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java 2007-05-19 20:40:04 UTC (rev 2822)
+++ trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java 2007-05-19 20:47:53 UTC (rev 2823)
@@ -89,6 +89,17 @@
contexts.put(new Long(context.context), context);
}
}
+
+ /**
+ * Remove context associated with device
+ *
+ * @param context Context to disassociate with device
+ */
+ void removeContext(ALCcontext context) {
+ synchronized (contexts) {
+ contexts.remove(new Long(context.context));
+ }
+ }
/**
* Marks this device and all of its contexts invalid
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|