dcsimg
Results 1 to 6 of 6

Thread: Detecting memory leaks....

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Location
    New York
    Posts
    11

    Question Detecting memory leaks....

    Does anyone know a program to detect memory leaks in VB programs? I really need one, cause I think there's a leak somewhere in the RPG i'm making. Evere since I animated the character, the character dissapears after about half a minutes, but it's still moving. When I close it, and try to run it again, VB gives me an "Out of memory" error. I want to find out if this is caused by the program, or something else. Thanks to anyone who can help.

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    First, you need to find out which sub leaks the memory. The sub must run a lot of times to get out of memory, I think. So make a counter so you can see how much times every sub runs. Maybe you can see this way where the leaking is.
    Oetje
    oetje@home.nl
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Are you creating arrays of objects for the animation that you are not destroying and uncreating afterwards?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    jim mcnamara
    Guest
    Do you know about using profilers? They show you what code runs how often.

    There were some around on the net for VB several years ago.

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Location
    New York
    Posts
    11
    Please, if anyone could download and examine my code, I can't figure out what's wrong. I'm quite stumped. I tried deleting the DC's before they were recreated, but it didn't seem to help. Maybe I'm doing something wrong. I appreciate any help anyone can give me.

  6. #6
    Hyperactive Member Eyes.Only's Avatar
    Join Date
    Oct 2001
    Location
    Minnesota
    Posts
    347
    you definately gotta deleteDC once ur done with it. even tho your saving the new memory address to your long variable, the old dc is still takin up that block in memory, u just lose ur ability to access it.

    i think? haha im not a game programmer...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width