L
Leon
Is it good ideas to use local thead as following example, then let
..Net garbage Collection take rest, to destory thread, release memory
and other?
Private Function DeleteUser(ByRef UserID As Integer) As Boolean
Dim deleteUser As Thread
Try
If Not IsNothing(DataBase) Then
deleteUser = New Thread(AddressOf Me.DeleteAllUsers)
deleteUser .Start()
End If
Catch ex As Exception
End Try
End Function
Private Function DeleteUser(ByRef UserID As Integer) As Boolean
Dim deleteUser As Thread
Try
If Not IsNothing(DataBase) Then
deleteUser = New Thread(AddressOf Me.DeleteAllUsers )
deleteUser .Start()
End If
Catch ex As Exception
Finally
deleteUser = nothing
End Try
End Function
If I destory the Thread after Finally as bove, does this line of code
always execute after local Thread finish its job first? or it may
destroy the local thread that is still processing?
Thank you very much.
..Net garbage Collection take rest, to destory thread, release memory
and other?
Private Function DeleteUser(ByRef UserID As Integer) As Boolean
Dim deleteUser As Thread
Try
If Not IsNothing(DataBase) Then
deleteUser = New Thread(AddressOf Me.DeleteAllUsers)
deleteUser .Start()
End If
Catch ex As Exception
End Try
End Function
Private Function DeleteUser(ByRef UserID As Integer) As Boolean
Dim deleteUser As Thread
Try
If Not IsNothing(DataBase) Then
deleteUser = New Thread(AddressOf Me.DeleteAllUsers )
deleteUser .Start()
End If
Catch ex As Exception
Finally
deleteUser = nothing
End Try
End Function
If I destory the Thread after Finally as bove, does this line of code
always execute after local Thread finish its job first? or it may
destroy the local thread that is still processing?
Thank you very much.