Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/06/2006, 12:34
Avatar de RsOfT
RsOfT
 
Fecha de Ingreso: marzo-2002
Ubicación: InterNET
Mensajes: 1.121
Antigüedad: 22 años, 2 meses
Puntos: 7
Muy interesante, gracias por la información.
Ya se que Dispose si libera la memoria y que puedo invocar el gabage colector desde el namespace System.GC.

Además que no es necesario igualar las variables locales a nothing según el siguiente texto:
Cita:
Do not set local variables to null (C#) or Nothing (Visual Basic .NET) because the JIT compiler can statically determine that the variable is no longer referenced and there is no need to explicitly set it to null. The following code shows an example using local variables.
Código:
Sub func() 
 Dim str1 As String 
 str1 = "abc" 
 'Avoid this
 str1 = Nothing 
End Sub 
Pero me queda la siguiente duda. En el ejemplo utilizan una variable tipo string pero no un objeto como es, por ejemplo, un DataSet. ¿Aún me queda la duda si al yo igualar un objeto a Nothing se libera la memoria?
__________________
.::RsOfT::.
--El que se aferra a lo conocido, nunca conocerá lo desconocido--
--Es intentando lo imposible como se realiza lo posible--
--Es de pésimo gusto contentarse con algo mediocre cuando lo excelente está a nuestro alcance--