Disposable: Emit 'wasDisposed' on destruction, not dispose()
Fixes segfaults when objects that were not explicitly disposed were collected by the GC.
This commit is contained in:
		
							parent
							
								
									b32d6c69cb
								
							
						
					
					
						commit
						3887342439
					
				
					 3 changed files with 5 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -70,9 +70,6 @@ RB_METHOD(disposableDispose)
 | 
			
		|||
	if (!c)
 | 
			
		||||
		return Qnil;
 | 
			
		||||
 | 
			
		||||
	/* Inform core */
 | 
			
		||||
	c->wasDisposed();
 | 
			
		||||
 | 
			
		||||
	disposableDisposeChildren(self);
 | 
			
		||||
 | 
			
		||||
	delete c;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue