|
-
Apr 29th, 2005, 06:43 AM
#1
Re: Program not ending
In your example you set frm to nothing but you don't set Form2 to nothing. Both of those object pointers or references exist, setting one to nothing but not the other is about the same thing as you don't put any to nothing.
-
Apr 29th, 2005, 06:45 AM
#2
Re: Program not ending
Anyhow... Try moving the line that closes the winsock to before you start unloading each form.
-
Apr 29th, 2005, 06:52 AM
#3
Thread Starter
Need-a-life Member
Re: Program not ending
 Originally Posted by Joacim Andersson
Anyhow... Try moving the line that closes the winsock to before you start unloading each form.
Wow!! How didn't I realize of that before. Anyway, I did move the line (which is safer), but still not closing.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 29th, 2005, 06:49 AM
#4
Thread Starter
Need-a-life Member
Re: Program not ending
 Originally Posted by Joacim Andersson
In your example you set frm to nothing but you don't set Form2 to nothing. Both of those object pointers or references exist, setting one to nothing but not the other is about the same thing as you don't put any to nothing.
Isn't that what Unload Form2 is for?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 29th, 2005, 03:12 PM
#5
Re: Program not ending
 Originally Posted by Mc Brain
Isn't that what Unload Form2 is for?
Unload Form2 will unload the visual parts of the form. It will not unload the code itself. Why would you set the reference to Nothing if it was OK to just unload it (which it is in most cases).
-
Apr 29th, 2005, 03:16 PM
#6
Thread Starter
Need-a-life Member
Re: Program not ending
 Originally Posted by Joacim Andersson
Unload Form2 will unload the visual parts of the form. It will not unload the code itself. Why would you set the reference to Nothing if it was OK to just unload it (which it is in most cases).
I don't know. I also don't know why we're discussing about an example or about something that is not needed instead of what should be changed or added in the real code.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 29th, 2005, 03:34 PM
#7
Re: Program not ending
 Originally Posted by Mc Brain
I also don't know why we're discussing about an example or about something that is not needed
Well, as I mentioned in my origional apply:
 Originally Posted by Joacim Andersson
On a side note... I see this code all the time
The key word here is On a side note.... Nothing to do with your question at all so let's not get ourself stuck on that issue.
I do understand that posting your project would be a lot to ask for but I it would be very helpful to be able to see this behaviour with my own (bug seeking ) eyes.
-
Apr 29th, 2005, 03:52 PM
#8
Thread Starter
Need-a-life Member
Re: Program not ending
 Originally Posted by Joacim Andersson
I do understand that posting your project would be a lot to ask for but I it would be very helpful to be able to see this behaviour with my own (bug seeking  ) eyes.
Yes, it does. It's a 90% working net-game... and would not like anyone on this planet be able to download the whole code.
Whenever I finishs it, I will consider releasing its code... but it does not outlook so good right now. 
Edit: What the h... was "net-working game"? Were you high??? I'm not fan with "working net-game" either, but I guess it explains better
Last edited by Mc Brain; May 1st, 2005 at 09:09 AM.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 29th, 2005, 04:08 PM
#9
Thread Starter
Need-a-life Member
Re: Program not ending
I think "End" was the problem. I remove the "just in case" End... and the process removed itself from memory as if everything was correctly deleted. 
VB Code:
Private Sub Finalizar()
If mkcDebug Then DebugPrint "frmTablero Finalizar"
Dim frm As Form
Set Juego = Nothing
Set MessagesToServer = Nothing
Set Canto = Nothing
Set Dichos = Nothing
' Set Quejas = Nothing
Set fTablero = Nothing
Set StBy = Nothing
Set MessageIDHistory = Nothing
Set ImgLst = Nothing
Set tFallo = Nothing
Set OtroJuego = Nothing
If udpPeer.State Then udpPeer.Close
For Each frm In Forms
Unload frm
Set frm = Nothing
Next
'End 'Just In Case
If mkcDebug Then DebugPrint "frmTablero Finalizar - Out"
End Sub
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Apr 29th, 2005, 04:21 PM
#10
Hyperactive Member
Re: Program not ending
Are you using multithread? I guess sme threads are not quiting.
-
Apr 29th, 2005, 08:57 PM
#11
Thread Starter
Need-a-life Member
Re: Program not ending
 Originally Posted by temp_12000
Are you using multithread? I guess sme threads are not quiting.
It's finishing correctly now.
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|