Results 1 to 29 of 29

Thread: Program not ending

Hybrid View

  1. #1
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    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.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Program not ending

    Anyhow... Try moving the line that closes the winsock to before you start unloading each form.

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Program not ending

    Quote 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.

  4. #4

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Program not ending

    Quote 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.

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Program not ending

    Quote 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).

  6. #6

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Program not ending

    Quote 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.

  7. #7
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Program not ending

    Quote 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:
    Quote 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.

  8. #8

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Program not ending

    Quote 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.

  9. #9

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    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:
    1. Private Sub Finalizar()
    2.     If mkcDebug Then DebugPrint "frmTablero   Finalizar"
    3.  
    4.     Dim frm As Form
    5.    
    6.     Set Juego = Nothing
    7.     Set MessagesToServer = Nothing
    8.     Set Canto = Nothing
    9.     Set Dichos = Nothing
    10. '    Set Quejas = Nothing
    11.     Set fTablero = Nothing
    12.     Set StBy = Nothing
    13.     Set MessageIDHistory = Nothing
    14.  
    15.     Set ImgLst = Nothing
    16.     Set tFallo = Nothing
    17.  
    18.     Set OtroJuego = Nothing
    19.    
    20.     If udpPeer.State Then udpPeer.Close
    21.    
    22.     For Each frm In Forms
    23.         Unload frm
    24.         Set frm = Nothing
    25.     Next
    26.    
    27.     'End  'Just In Case
    28.    
    29.     If mkcDebug Then DebugPrint "frmTablero   Finalizar - Out"
    30. 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.

  10. #10
    Hyperactive Member temp_12000's Avatar
    Join Date
    Jan 2004
    Location
    LA, USA
    Posts
    411

    Re: Program not ending

    Are you using multithread? I guess sme threads are not quiting.



  11. #11

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Program not ending

    Quote 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
  •  



Click Here to Expand Forum to Full Width