Anzitutto grazie per la disponibilità
Dunque, Ho provato ad aspettare del tempo per vedere se viene liberata la memoria ... dopo 3 minuti che ho chiuso il form è sempre uguale l'occupazione di memoria.
Ho provato anche a chiudere ed aprire in rapida sequenza il form ... alla prima apertura occupazione memoria 25Mb, dopo 30 aperture 41Mb, dopo 60 siamo a 56,5Mb dopo 100 siam a 75Mb ... e anche aspettando per vedere se libera la memoria rimane fermo a 75Mb ...
Ti posto il codice sorgente del form, è di una semplicità estrema...
codice:Public Class ContactAna Private Sub ContactAnaBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ContactAnaBindingNavigatorSaveItem.Click Dim Codice As String If (CodiceTextBox.Text = "") Then Codice = Me.NumberTableAdapter.GetNextNumber("ContactAna", "0") Me.CodiceTextBox.Text = Codice End If Me.Validate() Me.ContactAnaBindingSource.EndEdit() Me.ContactAnaTableAdapter.Update(Me.GeCoNETDataSet.ContactAna) End Sub Private Sub ContactAna_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'GeCoNETDataSet.Indirizzi' table. You can move, or remove it, as needed. Me.IndirizziTableAdapter.Fill(Me.GeCoNETDataSet.Indirizzi) 'TODO: This line of code loads data into the 'GeCoNETDataSet.ContactCat' table. You can move, or remove it, as needed. Me.ContactCatTableAdapter.Fill(Me.GeCoNETDataSet.ContactCat) 'TODO: This line of code loads data into the 'GeCoNETDataSet.Province' table. You can move, or remove it, as needed. Me.ProvinceTableAdapter.Fill(Me.GeCoNETDataSet.Province) 'TODO: This line of code loads data into the 'GeCoNETDataSet.ContactAna' table. You can move, or remove it, as needed. Me.ContactAnaTableAdapter.Fill(Me.GeCoNETDataSet.ContactAna) End Sub Private Sub ContactAna_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed Me.Validate() Me.ContactAnaBindingSource.EndEdit() Me.ContactAnaTableAdapter.Update(Me.GeCoNETDataSet.ContactAna) Me.Dispose() Me.GeCoNETDataSet.Clear() Me.GeCoNETDataSet.ContactAna.Dispose() End Sub End Class


Rispondi quotando