-- IE, validacion de que tenga vinculado complementos, no pueda eliminarlo

-- sessionsactivas. boton par acorrer GC
This commit is contained in:
rrene
2020-05-27 13:58:17 -07:00
parent 3e034bbbc8
commit 2729679d35
3 changed files with 65 additions and 37 deletions

View File

@@ -20,6 +20,10 @@
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="LBGC" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> GC"
/>
</li>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>

View File

@@ -196,4 +196,45 @@ Partial Class SessionesActivas
Notificaciones.AlertaVentana(TxtMensaje.Text, lista, timeoutseconds:=0)
RegistraScript($"$(""#DivMensaje"").modal('hide');console.log('{Decripta(Context.User.Identity.Name)}')")
End Sub
Private Sub VerGC()
Dim myGCCol As MyGCCollectClass = New MyGCCollectClass()
Console.WriteLine("The highest generation is {0}", GC.MaxGeneration)
myGCCol.MakeSomeGarbage()
Console.WriteLine("Generation: {0}", GC.GetGeneration(myGCCol))
Console.WriteLine("Total Memory: {0}", GC.GetTotalMemory(False))
GC.Collect(0)
Console.WriteLine("Generation: {0}", GC.GetGeneration(myGCCol))
Console.WriteLine("Total Memory: {0}", GC.GetTotalMemory(False))
GC.Collect(2)
Console.WriteLine("Generation: {0}", GC.GetGeneration(myGCCol))
Console.WriteLine("Total Memory: {0}", GC.GetTotalMemory(False))
Console.Read()
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub
Private Sub LBGC_Click(sender As Object, e As EventArgs) Handles LBGC.Click
GC.Collect()
GC.WaitForPendingFinalizers()
End Sub
Class MyGCCollectClass
Public Sub MakeSomeGarbage()
Dim vt As Version
For i As Integer = 0 To 1000 - 1
vt = New Version()
Next
End Sub
End Class
End Class