FIX: System Handles Created Via AudioClip.play() Are Not Being Freed (261061)



The information in this article applies to:

  • Microsoft virtual machine

This article was previously published under Q261061

SYMPTOMS

You may notice a memory leak in programs that use the AudioClip class to repeatedly play *.au files.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This bug has been verified to occur in both the 3100 and 3200 series of the Microsoft virtual machine.

This problem was corrected in Windows 2000 Service Pack 1.

MORE INFORMATION

Steps to Reproduce Behavior

Compile and run the following code:
import com.ms.vm.loader.*;

public class AUPlay { 
  public static void main(String[] args) throws Exception { 
    try { 
      while (true) { 
        URLAudioClip clip;
        clip = (URLAudioClip)ClassLoader.getSystemResource("sound.au").getContent();      
        clip.play();
        Thread.sleep(1000);
        clip.stop();
        System.gc();
      }
    } catch (Exception e) { 
      e.printStackTrace();
    }
  }
}
				

For additional information about the latest service pack for Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack



Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbDSupport kbJavaVM33xxfix kbWin2000sp1Fix KB261061