synchronize close methods that are invoked by the finalize method
This commit is contained in:
		
							parent
							
								
									8af7281e69
								
							
						
					
					
						commit
						894b300ad0
					
				@ -28,7 +28,7 @@ public class Pdh extends Win32Bindings {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void close() throws Win32Exception {
 | 
			
		||||
    public synchronized void close() throws Win32Exception {
 | 
			
		||||
        if (h_counter != -1l) {
 | 
			
		||||
            pdhRemoveCounter(h_counter);
 | 
			
		||||
            h_counter = -1l;
 | 
			
		||||
 | 
			
		||||
@ -41,7 +41,7 @@ public class RegistryKey extends Win32Bindings
 | 
			
		||||
        this.m_hkey = hkey;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public void close()
 | 
			
		||||
    public synchronized void close()
 | 
			
		||||
    {
 | 
			
		||||
        if (this.m_hkey != 0) {
 | 
			
		||||
            RegCloseKey(this.m_hkey);
 | 
			
		||||
 | 
			
		||||
@ -125,7 +125,7 @@ public class Service extends Win32Bindings implements java.io.Serializable
 | 
			
		||||
        this.close();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void close()
 | 
			
		||||
    public synchronized void close()
 | 
			
		||||
    {
 | 
			
		||||
        if(this.m_hService != 0) {
 | 
			
		||||
            CloseServiceHandle(this.m_hService);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user