X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0022.html-inc;h=bdf8c943171934678012135f98afb59a5caacb0b;hb=6855e5615bff699e656bdd67be71ac965fc77f54;hp=da0846f7e72f96b7501e8b50a220fb61a9da74a9;hpb=6e0d970b5047980a17d230b86d5c27c49213d18c;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0022.html-inc b/pages/blog-0022.html-inc index da0846f..bdf8c94 100644 --- a/pages/blog-0022.html-inc +++ b/pages/blog-0022.html-inc @@ -1,6 +1,31 @@

-Catching memory leaks in XS +Quick Game for Toronto Perl Mongers

-
 I slay dragons, yonder

So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here. The problem occurs where in XS there is

RETVAL = (cast *) safemalloc( ... );
 and safefree(...) is never called.
Here is a in code example lines 1082 on.

My question is how I can mitigate these memory leaks? One idea I had was to store all malloc'd pointers to an array that is safefree'd on DESTROY or hooked into perl GC somehow .


Any guidance is helpful.

--yapgh
\ No newline at end of file +
+
Beep ... Boop
+

+
+So I am preparing a presentation of the new SDL perl for February's Toronto Perl Mongers meeting. What better way to so off SDL perl then with a game?
+
+I started hacking a small point an click game a few days back. I really didn't have a idea in mind, but I did have a goal. I wanted to make a game that shows the basics of a game in SDL. Drawing to screen, game loops, physics and so on. I think I have accomplished it so far.
+
+Take a look at it here. Download that and call it[Shooter.pl]. To win click the balls.
+
+To play this game you need the following:
+
+
+I will put up binaries soon-ish.
+
+It is a playable (albeit hard) game right now. All 7 seven levels of it. The purpose of the game is simple click the balls to win. Sounds easy but it isn't. You also get a time in milliseconds after each level. Share your scores on here! I will leave it up to you guys to be honest.
+
+I do have to tidy it up and right documentation for it. This way I will be able to present it clearly to my fellow mongers. I am also still looking for ideas to make this a more polished game. FROGGS recommend I make it a classic NES duck hunt game. I thought since I am using gravity I could do a UFO game out of it where you shoot the UFOs. I am open to your ideas.
+


+

\ No newline at end of file