Menu

#3 Memory Leaks & Minor Fixes

closed
nobody
None
5
2008-05-07
2008-05-04
Malachi
No

This patch mainly fixes some memory leaks. Here are the exact details:

52 bytes saved from MainSDL
4 bytes saved from MainGL in Global
2 bytes saved from Global
104 bytes saved from GroundSegment in GroundMetal
104 bytes saved from GroundSegment in GroundSea
60 bytes saved from PowerUp in PowerUps
144 bytes saved from ItemThing in PowerUps
6000+ bytes saved from linked list member variables in ScreenItemAdd

The other changes are minor things. Listed below:
- Default scores have their date set to a more current date
- Adjusting music volume through SDL_Mixer also adjust CD audio volume on Linux (using alsa-utils)
- Fixes AudioSDLMixer::setSoundVolume() doxygen description
- Mix_CloseAudio() is now called once
- Removes cstdio from Ammo.cpp (was unneeded)
- Changes some leftover C-style header includes to C++ style

The patch needs to be copied to the src directory and then applied.

Discussion

  • Malachi

    Malachi - 2008-05-04

    Logged In: YES
    user_id=1320500
    Originator: YES

    One last thing. This patch is designed to be applied to revision 66 of the subversion repository.

     
  • Paul Wise

    Paul Wise - 2008-05-05

    Logged In: YES
    user_id=35028
    Originator: NO

    There are an awful lot of whitespace changes mixed in to the patch, could you revert them and re-upload the patch?

    Also, can you use git-svn and git-format-patch so that I get a good message for the commit log? Preferrably you could also split the patch up into individual changes, commit each locally, do git format-patch trunk and send those in?

    Also, would you like to be added to the project?

    Also, the main thing to do next is replace the non-free TexFont.* with a wrapper around plib. There is a partial one available, but is GPL and the Artistic licence is GPL-incompatible:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467125#10

     
  • Malachi

    Malachi - 2008-05-05

    Logged In: YES
    user_id=1320500
    Originator: YES

    File Added: rev66.patch

     
  • Malachi

    Malachi - 2008-05-05

    Logged In: YES
    user_id=1320500
    Originator: YES

    Ok, I saw the white space changes and updated the patch using git-svn & git-format-patch. I'm new to git-svn so I didn't split the patch into individual changes. However, I did give a detailed summary of the changes in the commit.

    Yes, I would like to be added to the project.

     
  • Paul Wise

    Paul Wise - 2008-05-06

    Logged In: YES
    user_id=35028
    Originator: NO

    Applied most of your changes with some minor changes. I used git-gui and gitk to split the changes up into logical chunks and commit them.

    Please configure your editor to use spaces rather than tabs because that is what most of the code uses.

    Please rerun git-svn using this command instead of what you used:

    git svn clone --stdlayout https://chromium-bsu.svn.sourceforge.net/svnroot/chromium-bsu/chromium-bsu

    The Ground* changes caused segfaults so I did not apply those.

    I don't understand why the timestamp needs to be updated, so I didn't apply the hiscore change.

    BTW, valgrind detects more leaks in the ScreenItemAdd code.

    You seem to have dropped the Ammo.cpp change, but I added it anyway.

     
  • Paul Wise

    Paul Wise - 2008-05-06

    Logged In: YES
    user_id=35028
    Originator: NO

    Added you to the project, please make commits in logical chunks only, and use tabs not spaces.

     
  • Malachi

    Malachi - 2008-05-07

    Logged In: YES
    user_id=1320500
    Originator: YES

    Thank you, that sounds good. The changes you kept were for the best. The patch makes up for some of the leaks in the ScreenItemAdd class I am still working on finding the cause of the rest.

     
  • Malachi

    Malachi - 2008-05-07
    • status: open --> closed
     

Log in to post a comment.