Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

I may have plugged a memory leak #203

Closed
wants to merge 87 commits into from

5 participants

Dominique Dumont Tobias Leich Jeffrey T. Palmer Breno G. de Oliveira Kartik Thakore
Dominique Dumont
Collaborator

Hello

I'm writing an application which displays photos with fade-in fade-out transition. Each transition
leaks ~ 40MB (eeek).

I'm trying to nail down these memory leaks. This patch may be the first plug. Test::MemoryLeak does show
an improvement. All your SDL tests pass fine.

Please tell me if I'm in the right direction.

All the best

Dod

FROGGS and others added some commits
Tobias Leich FROGGS fixed SDL::Video::blit_surface that it works like described in docs 4acb972
Tobias Leich FROGGS SDL::RWOps->new_const_mem is working (you can pass a scalar containin…
…g the data)
2066bac
Tobias Leich FROGGS removed stupid comment 415c856
Tobias Leich FROGGS Merge branch 'experimental' of github.com:PerlGameDev/SDL into c-sdl-…
…rwops
346ed59
Tobias Leich FROGGS docs for synopsis with an example for a levelfile 44a631d
Tobias Leich FROGGS typo ce898dc
Tobias Leich FROGGS fixed function name, it is init_sub_system and quit_sub_system in xs ede2d78
Tobias Leich FROGGS no need to run 'SDLPerl <script>' instead of 'perl <script>' if we ru…
…n silent tests
e8c18be
Jeffrey T. Palmer jtpalmer Added space in test command 8b9d5b9
Tobias Leich FROGGS just need to run Build test as an external cmd if we use SDLPerl as i…
…nterpreter
14cda26
Tobias Leich FROGGS dev release 2.534_01 b16eb8d
Tobias Leich FROGGS testing for a specific framecount can fail if the system is slow 2b02802
Jeffrey T. Palmer jtpalmer Fixed typo 424dd90
Jeffrey T. Palmer jtpalmer Added draw_trigon, made changes to draw_polygon fa867d3
Jeffrey T. Palmer jtpalmer SDLx::Surface::draw_polygon should return $self 0cff9b4
Jeffrey T. Palmer jtpalmer Better optional antialias for draw_polygon 6c50555
Jeffrey T. Palmer jtpalmer Added SDLx::Surface::draw_ellipse 46232de
Jeffrey T. Palmer jtpalmer Added SDLx::Surface::draw_arc and draw_bezier bb48b34
Jeffrey T. Palmer jtpalmer Tiny typo fixes 2212d87
Breno G. de Oliveira garu improved error message for SDLx::Text 66e4d48
Jeffrey T. Palmer jtpalmer Updated change log ... again a39c4d2
Jeffrey T. Palmer jtpalmer Better change log 646e318
Jeffrey T. Palmer jtpalmer Fixed SDLx::Rect copy, move and inflate d5a6950
Jeffrey T. Palmer jtpalmer Merge branch 'master' of github.com:PerlGameDev/SDL into experimental c5e16f9
Jeffrey T. Palmer jtpalmer Documented modification of dest_rect when blitting 905138e
Jeffrey T. Palmer jtpalmer Preparing for 2.534_02 release 99309de
Jeffrey T. Palmer jtpalmer Updated impact graph links 06e2488
Jeffrey T. Palmer jtpalmer Updated contributors link 3d85a93
Jeffrey T. Palmer jtpalmer Fixed SDL_EVENTMASK documentation f190967
Jeffrey T. Palmer jtpalmer Fixed typo. bricas++ 7186ab7
Kartik Thakore kthakore Does this hack work? 40d01bf
Kartik Thakore kthakore Merge branch 'experimental' of github.com:PerlGameDev/SDL into experi…
…mental
fbd7358
Jeffrey T. Palmer jtpalmer Fix typo f5d5493
Tobias Leich FROGGS fixed function name, it is init_sub_system and quit_sub_system in xs a484a8a
Jeffrey T. Palmer jtpalmer Added space in test command 57c5667
Tobias Leich FROGGS no need to run 'SDLPerl <script>' instead of 'perl <script>' if we ru…
…n silent tests
1ae6ccb
Tobias Leich FROGGS just need to run Build test as an external cmd if we use SDLPerl as i…
…nterpreter
3d651d3
Tobias Leich FROGGS dev release 2.534_01 4dd5739
Tobias Leich FROGGS testing for a specific framecount can fail if the system is slow d5c616c
Jeffrey T. Palmer jtpalmer Fixed typo 9b72a41
Jeffrey T. Palmer jtpalmer Added draw_trigon, made changes to draw_polygon ed23439
Jeffrey T. Palmer jtpalmer SDLx::Surface::draw_polygon should return $self 7a03eba
Jeffrey T. Palmer jtpalmer Better optional antialias for draw_polygon 082a66b
Jeffrey T. Palmer jtpalmer Added SDLx::Surface::draw_ellipse 9b78147
Jeffrey T. Palmer jtpalmer Added SDLx::Surface::draw_arc and draw_bezier f029934
Jeffrey T. Palmer jtpalmer Tiny typo fixes 22d7998
Jeffrey T. Palmer jtpalmer Updated change log ... again 17bd0ba
Jeffrey T. Palmer jtpalmer Better change log d7c2c82
Jeffrey T. Palmer jtpalmer Fixed SDLx::Rect copy, move and inflate 6a8e376
Jeffrey T. Palmer jtpalmer Documented modification of dest_rect when blitting 17e6252
Jeffrey T. Palmer jtpalmer Preparing for 2.534_02 release a79e3b7
Jeffrey T. Palmer jtpalmer Updated impact graph links 5b745db
Jeffrey T. Palmer jtpalmer Updated contributors link 59dfc7f
Jeffrey T. Palmer jtpalmer Fixed SDL_EVENTMASK documentation 4ca9f3c
Jeffrey T. Palmer jtpalmer Fixed typo. bricas++ b74f36e
Breno G. de Oliveira garu Merge branch 'experimental' of github.com:PerlGameDev/SDL into experi…
…mental

Conflicts:
	CHANGELOG
5c68f7c
Breno G. de Oliveira garu SDLx::Text now supports bold, italic, underline, strikethrough 92d091c
Breno G. de Oliveira garu allowing styles to be set during construction, in new() 1104312
Breno G. de Oliveira garu improving example of text styles 8f4307e
Kartik Thakore kthakore Merge branch 'experimental' of github.com:PerlGameDev/SDL into experi…
…mental
db05f1e
Kartik Thakore kthakore Merge branch 'master' into experimental e1d8706
Kartik Thakore kthakore New Experimental Version. Cause BLAIZER pushed brand new XS code to m…
…aster ... :(
2505625
Breno G. de Oliveira garu improving documentation for SDLx::Text 184fc17
Breno G. de Oliveira garu SDLx::Text multiline support \o/ f737c5b
Breno G. de Oliveira garu SDLx::Text word wrapping support 0b0fa51
Breno G. de Oliveira garu SDLx::Text "word_wrap" example 4276fdb
Breno G. de Oliveira garu Merge branch 'experimental' of github.com:PerlGameDev/SDL into experi…
…mental
21d8eeb
Tobias Leich FROGGS merged branch f-sdl-video-blit_surface in (blit using undef rects) 66c981d
Tobias Leich FROGGS Merge branch 'c-sdl-rwops' of github.com:PerlGameDev/SDL into experim…
…ental
30d078c
Tobias Leich FROGGS updated changes for dev release 5f05512
Dominique Dumont dod38fr plug memory leak (surface refcount increased) 4046e91
Dominique Dumont dod38fr avoid sv2mortal on returned value. Prevents a free issue when using s…
…uraface with an anonymous surface
d850194
Tobias Leich FROGGS added note about freeing SDL_CreateRGBSurfaceFrom 5e16620
Tobias Leich FROGGS added OUTPUT section to foreground() sub, this removes a compiler war…
…ning
155a625
Tobias Leich FROGGS there is no such thing as SDLx::Color a66253c
Tobias Leich FROGGS SVs that we dont return via RETVAL must be made mortal c807436
Tobias Leich FROGGS patch by dod: not using RETVAL so sv_2mortal isnt called twice, and r…
…emoving the workaround (SvREFCNT_inc)
eb0610a
Dominique Dumont dod38fr added some explanations in rect 7e43aba
Dominique Dumont dod38fr Revert "added some explanations in rect". Messed up after cherry picking
This reverts commit 7e43aba3618249b2200e493c2cc0154b94b8789b.
97730ff
Dominique Dumont dod38fr added some explanations in rect (take 2) 1d178b5
Dominique Dumont dod38fr renamed surface in assert_surface 0016791
Dominique Dumont dod38fr merged in froggs's fixes 6937517
Dominique Dumont dod38fr renamed rect->create_rect 0f67f2e
Dominique Dumont dod38fr added small comment b19027c
Dominique Dumont dod38fr changed create_rect into create_mortal_rect. Ensures that a morral re…
…ct is returned. Simplified code that no longer require to dec refcnt
6678a7f
Dominique Dumont dod38fr forgot to change this call to surface. Now calls assert_surface. Simp…
…lified code
5c38b46
Dominique Dumont dod38fr plug AV leak in __list_rgb*. Added some comments 9709efb
Dominique Dumont
Collaborator

I've definitely plugged huge leaks. My app is no longer leaking :-)

I may have messed up this pull request: a lot of commits are shown. Please tell me if this pull request is still useable or if I should close it and open a new one.

All the best

Tobias Leich
Owner

Hi, I merged in your master into our fight_memleaks branch...

If this applies clean will merge this into experimental and do a dev release... After that the same with our master.

What do you think about getting the commit bit?

Cheers

Tobias Leich FROGGS closed this
Dominique Dumont
Collaborator
Tobias Leich
Owner

Hi Dominique,

You have commit bit now. Here are our "rules":
1. Don't push to master, thats the job of the guy that is going to make a release.
2. Push new features to a separate branch. The branch should be called like the feature.
3. Push bugfixes to experimental if you make sure it is working (by running test case and maybe make extra tests).
4. Push bugfixes to new branches if they may break something.
5. If you implement a new feature, make tests and docs (in lib/pod folder).
6. Don't break the API like it is written down in docs. If the API you wanna change is not documented, discuss with us first.
7. Have fun! And dont be afraid to ask for help. Kthakore and I are maintainer, but all the others (like garu and Blaizer for example) know almost as much as we do.

Cheers

Dominique Dumont
Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 20, 2011
  1. Tobias Leich
Commits on Apr 25, 2011
  1. Tobias Leich
Commits on May 2, 2011
  1. Tobias Leich

    removed stupid comment

    FROGGS authored
  2. Tobias Leich
  3. Tobias Leich
  4. Tobias Leich

    typo

    FROGGS authored
Commits on Jun 11, 2011
  1. Tobias Leich
Commits on Jun 12, 2011
  1. Tobias Leich
Commits on Jun 13, 2011
  1. Jeffrey T. Palmer

    Added space in test command

    jtpalmer authored
  2. Tobias Leich
  3. Tobias Leich

    dev release 2.534_01

    FROGGS authored
Commits on Jun 17, 2011
  1. Tobias Leich
Commits on Jun 29, 2011
  1. Jeffrey T. Palmer

    Fixed typo

    jtpalmer authored
Commits on Jun 30, 2011
  1. Jeffrey T. Palmer
Commits on Jul 1, 2011
  1. Jeffrey T. Palmer
  2. Jeffrey T. Palmer
Commits on Jul 2, 2011
  1. Jeffrey T. Palmer
  2. Jeffrey T. Palmer
Commits on Jul 5, 2011
  1. Jeffrey T. Palmer

    Tiny typo fixes

    jtpalmer authored
Commits on Aug 1, 2011
  1. Breno G. de Oliveira Jeffrey T. Palmer

    improved error message for SDLx::Text

    garu authored jtpalmer committed
  2. Jeffrey T. Palmer

    Updated change log ... again

    jtpalmer authored
  3. Jeffrey T. Palmer

    Better change log

    jtpalmer authored
  4. Jeffrey T. Palmer
  5. Jeffrey T. Palmer
Commits on Aug 6, 2011
  1. Jeffrey T. Palmer
Commits on Aug 27, 2011
  1. Jeffrey T. Palmer
Commits on Sep 7, 2011
  1. Jeffrey T. Palmer

    Updated impact graph links

    jtpalmer authored
Commits on Sep 9, 2011
  1. Jeffrey T. Palmer

    Updated contributors link

    jtpalmer authored
Commits on Sep 11, 2011
  1. Jeffrey T. Palmer
Commits on Sep 16, 2011
  1. Jeffrey T. Palmer

    Fixed typo. bricas++

    jtpalmer authored
Commits on Sep 17, 2011
  1. Kartik Thakore

    Does this hack work?

    kthakore authored
  2. Kartik Thakore
  3. Jeffrey T. Palmer

    Fix typo

    jtpalmer authored
Commits on Sep 28, 2011
  1. Tobias Leich Breno G. de Oliveira
  2. Jeffrey T. Palmer Breno G. de Oliveira

    Added space in test command

    jtpalmer authored garu committed
  3. Tobias Leich Breno G. de Oliveira

    no need to run 'SDLPerl <script>' instead of 'perl <script>' if we ru…

    FROGGS authored garu committed
    …n silent tests
  4. Tobias Leich Breno G. de Oliveira

    just need to run Build test as an external cmd if we use SDLPerl as i…

    FROGGS authored garu committed
    …nterpreter
  5. Tobias Leich Breno G. de Oliveira

    dev release 2.534_01

    FROGGS authored garu committed
  6. Tobias Leich Breno G. de Oliveira
  7. Jeffrey T. Palmer Breno G. de Oliveira

    Fixed typo

    jtpalmer authored garu committed
  8. Jeffrey T. Palmer Breno G. de Oliveira

    Added draw_trigon, made changes to draw_polygon

    jtpalmer authored garu committed
  9. Jeffrey T. Palmer Breno G. de Oliveira

    SDLx::Surface::draw_polygon should return $self

    jtpalmer authored garu committed
  10. Jeffrey T. Palmer Breno G. de Oliveira

    Better optional antialias for draw_polygon

    jtpalmer authored garu committed
  11. Jeffrey T. Palmer Breno G. de Oliveira

    Added SDLx::Surface::draw_ellipse

    jtpalmer authored garu committed
  12. Jeffrey T. Palmer Breno G. de Oliveira

    Added SDLx::Surface::draw_arc and draw_bezier

    jtpalmer authored garu committed
  13. Jeffrey T. Palmer Breno G. de Oliveira

    Tiny typo fixes

    jtpalmer authored garu committed
  14. Jeffrey T. Palmer Breno G. de Oliveira

    Updated change log ... again

    jtpalmer authored garu committed
  15. Jeffrey T. Palmer Breno G. de Oliveira

    Better change log

    jtpalmer authored garu committed
  16. Jeffrey T. Palmer Breno G. de Oliveira

    Fixed SDLx::Rect copy, move and inflate

    jtpalmer authored garu committed
  17. Jeffrey T. Palmer Breno G. de Oliveira

    Documented modification of dest_rect when blitting

    jtpalmer authored garu committed
  18. Jeffrey T. Palmer Breno G. de Oliveira

    Preparing for 2.534_02 release

    jtpalmer authored garu committed
  19. Jeffrey T. Palmer Breno G. de Oliveira

    Updated impact graph links

    jtpalmer authored garu committed
  20. Jeffrey T. Palmer Breno G. de Oliveira

    Updated contributors link

    jtpalmer authored garu committed
  21. Jeffrey T. Palmer Breno G. de Oliveira

    Fixed SDL_EVENTMASK documentation

    jtpalmer authored garu committed
  22. Jeffrey T. Palmer Breno G. de Oliveira

    Fixed typo. bricas++

    jtpalmer authored garu committed
  23. Breno G. de Oliveira

    Merge branch 'experimental' of github.com:PerlGameDev/SDL into experi…

    garu authored
    …mental
    
    Conflicts:
    	CHANGELOG
Commits on Sep 29, 2011
  1. Breno G. de Oliveira
  2. Breno G. de Oliveira
  3. Breno G. de Oliveira

    improving example of text styles

    garu authored
Commits on Oct 3, 2011
  1. Kartik Thakore
  2. Kartik Thakore
  3. Kartik Thakore
Commits on Oct 4, 2011
  1. Breno G. de Oliveira
  2. Breno G. de Oliveira

    SDLx::Text multiline support \o/

    garu authored
  3. Breno G. de Oliveira

    SDLx::Text word wrapping support

    garu authored
  4. Breno G. de Oliveira

    SDLx::Text "word_wrap" example

    garu authored
  5. Breno G. de Oliveira
Commits on Oct 6, 2011
  1. Tobias Leich
  2. Tobias Leich
  3. Tobias Leich
Commits on Oct 12, 2011
  1. Dominique Dumont
Commits on Oct 14, 2011
  1. Dominique Dumont

    avoid sv2mortal on returned value. Prevents a free issue when using s…

    dod38fr authored
    …uraface with an anonymous surface
  2. Tobias Leich
  3. Tobias Leich
  4. Tobias Leich
  5. Tobias Leich
  6. Tobias Leich

    patch by dod: not using RETVAL so sv_2mortal isnt called twice, and r…

    FROGGS authored
    …emoving the workaround (SvREFCNT_inc)
Commits on Oct 15, 2011
  1. Dominique Dumont
  2. Dominique Dumont

    Revert "added some explanations in rect". Messed up after cherry picking

    dod38fr authored
    This reverts commit 7e43aba3618249b2200e493c2cc0154b94b8789b.
  3. Dominique Dumont
  4. Dominique Dumont
  5. Dominique Dumont

    merged in froggs's fixes

    dod38fr authored
  6. Dominique Dumont

    renamed rect->create_rect

    dod38fr authored
  7. Dominique Dumont

    added small comment

    dod38fr authored
  8. Dominique Dumont

    changed create_rect into create_mortal_rect. Ensures that a morral re…

    dod38fr authored
    …ct is returned. Simplified code that no longer require to dec refcnt
  9. Dominique Dumont
  10. Dominique Dumont
Something went wrong with that request. Please try again.