mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 14:12:32 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			311 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			311 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| program ex7;
 | |
| 
 | |
| { Program to demonstrate the TObject.Free call }
 | |
| 
 | |
| Uses Objects;
 | |
| 
 | |
| Var O : PObject;
 | |
| 
 | |
| begin
 | |
|   Writeln ('Memavail : ',Memavail);
 | |
|   // Allocate memory for object.
 | |
|   O:=New(PObject,Init);
 | |
|   Writeln ('Memavail : ',Memavail);
 | |
|   // Free memory of object.
 | |
|   O^.free;
 | |
|   Writeln ('Memavail : ',Memavail);
 | |
| end. | 
