title: How to properly close ODP.net connection : dispose() or close()?
body: <p>this is my powershell code : </p>
  
  <pre><code>[void][System.Reflection.Assembly]::LoadFile("C:\DLL\Oracle.ManagedDataAccess.dll")
  $OracleConnexion = New-Object Oracle.ManagedDataAccess.Client.OracleConnection('User Id=test;Password="test";Data Source=10.2.2.1/TEST')
  $TimeOut = 60
  
  $OracleConnexion.Open()
  
  $Query=$OracleConnexion.CreateCommand()
  $Query.CommandText="Select * FROM TEST"
  $Query.CommandTimeout = $Timeout
  
  $ExecuteRequete=$Requete.ExecuteReader()
  
  while ($ExecuteRequete.Read()) {
  
      $SiebelLastRecord += $ExecuteRequete.GetDateTime(0).ToString()
  
  } 
  
  $OracleConnexion.Close()
  </code></pre>
  
  <p>So I'm opening ODP.NET connection with <code>$OracleConnexion.open()</code> then closing it with <code>$OracleConnexion.close()</code> is it sufficient to close properly my connection to Oracle Database? Or should I use <code>$OracleConnexion.Dispose()</code> ? </p>
  
  <p>I execute my powershell every 5min via Task scheduler... So maybe Should I use Dispose() to avoid memory saturation?</p>