nswamy commented on a change in pull request #14372: Memory fixes. Resolves 
#10867, and resolves #14080
URL: https://github.com/apache/incubator-mxnet/pull/14372#discussion_r269743587
 
 

 ##########
 File path: 
scala-package/core/src/main/scala/org/apache/mxnet/ResourceScope.scala
 ##########
 @@ -179,7 +192,7 @@ object ResourceScope {
     * @param r ResourceScope to remove
     */
   private[mxnet] def removeFromThreadLocal(r: ResourceScope): Unit = {
-    threadLocalScopes.get() -= r
+    threadLocalScopes.get().remove(threadLocalScopes.get().lastIndexOf(r))
 
 Review comment:
   i am concerned because of the above. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to