Click here to Skip to main content
16,017,745 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Simple Scrollbar question Pin
vertig07303-May-05 2:13
vertig07303-May-05 2:13 
GeneralToolTip with RTL property Pin
lmaks2-May-05 21:55
lmaks2-May-05 21:55 
GeneralRe: ToolTip with RTL property Pin
Anonymous3-May-05 2:32
Anonymous3-May-05 2:32 
GeneralRe: ToolTip with RTL property Pin
lmaks3-May-05 3:51
lmaks3-May-05 3:51 
GeneralRe: ToolTip with RTL property Pin
Rizwan Bashir3-May-05 21:20
Rizwan Bashir3-May-05 21:20 
GeneralDispose Class Pin
nitin_ion2-May-05 21:05
nitin_ion2-May-05 21:05 
GeneralRe: Dispose Class Pin
Colin Angus Mackay3-May-05 1:07
Colin Angus Mackay3-May-05 1:07 
GeneralRe: Dispose Class Pin
nitin_ion3-May-05 1:25
nitin_ion3-May-05 1:25 
This is the way i am using the references

Public Class Class3
Private strH3 As String

Public Sub dispose()
GC.Collect()
End Sub

Public Property H3() As String
Get
Return strH3
End Get
Set(ByVal Value As String)
strH3 = Value
End Set
End Property

End Class

Public Class Class1

Dim c3 As Class3 = New Class3

Public Sub H3()
c3.H3 = "Class3 => Class1"
MsgBox(c3.H3)
c3.dispose()
End Sub

Public Sub dispose()
GC.Collect()
End Sub
End Class



Form_Load event of the application

Dim a As Class1 = New Class1

a.H3()
a.dispose()
GC.Collect()

a.H3()

Now when i call the c3.dispose in class1 then the reference to tclass3 should be removed and later when i call a3.dispose reference to a class1 will be destroyed. Second call to a.h3 works fine as well.

I have tried the finalize method as well but the result is same

now when i set a=nothing then it works fine but we know that nothing sets it to the default value. so if i have a constructor with some default values it will set it to that.

If i am wrong do correct it.
GeneralRe: Dispose Class Pin
Colin Angus Mackay3-May-05 1:36
Colin Angus Mackay3-May-05 1:36 
GeneralRe: Dispose Class Pin
nitin_ion3-May-05 1:48
nitin_ion3-May-05 1:48 
GeneralRe: Dispose Class Pin
Colin Angus Mackay3-May-05 3:24
Colin Angus Mackay3-May-05 3:24 
GeneralRe: Dispose Class Pin
nitin_ion3-May-05 19:21
nitin_ion3-May-05 19:21 
GeneralRe: Dispose Class Pin
Colin Angus Mackay3-May-05 20:46
Colin Angus Mackay3-May-05 20:46 
GeneralRe: Dispose Class Pin
nitin_ion3-May-05 20:51
nitin_ion3-May-05 20:51 
GeneralRe: Dispose Class Pin
Colin Angus Mackay3-May-05 22:28
Colin Angus Mackay3-May-05 22:28 
GeneralRe: Dispose Class Pin
nitin_ion3-May-05 22:59
nitin_ion3-May-05 22:59 
QuestionHow to capture width in paint event of picturebox Pin
meghadwivedi2-May-05 19:52
meghadwivedi2-May-05 19:52 
AnswerRe: How to capture width in paint event of picturebox Pin
Fernando Soto3-May-05 14:30
Fernando Soto3-May-05 14:30 
Generalproblem with ntvdm.exe Pin
Jason Brumwell2-May-05 17:02
sussJason Brumwell2-May-05 17:02 
GeneralRe: problem with ntvdm.exe Pin
Dave Kreskowiak3-May-05 2:22
mveDave Kreskowiak3-May-05 2:22 
GeneralRe: problem with ntvdm.exe Pin
Jason Brumwell3-May-05 15:46
sussJason Brumwell3-May-05 15:46 
GeneralWeird Textbox Behavior Pin
Computer_Guy2-May-05 16:29
Computer_Guy2-May-05 16:29 
GeneralRe: Weird Textbox Behavior Pin
Het21092-May-05 18:59
Het21092-May-05 18:59 
GeneralRe: Weird Textbox Behavior Pin
Computer_Guy3-May-05 2:36
Computer_Guy3-May-05 2:36 
GeneralRe: Weird Textbox Behavior Pin
lmaks3-May-05 19:19
lmaks3-May-05 19:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.