Free memory : Memory : Windows C# Examples


C# Examples » Windows » Memory »

 

Free memory









    
using  System;
using  System.IO;
using  System.Reflection;
using  System.Runtime.ConstrainedExecution;
using  System.Runtime.InteropServices;
using  Microsoft.Win32.SafeHandles;

public  class  MainClass
{
        public  static  void  Main()
        {
                IntPtr  ptr  =  Marshal.AllocHGlobal(1024);

                if  (ptr  !=  IntPtr.Zero){
                                Marshal.FreeHGlobal(ptr);
                                ptr  =  IntPtr.Zero;
                }
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Windows
» Memory