gbrainy r466 - trunk/src
- From: jmas svn gnome org
- To: svn-commits-list gnome org
- Subject: gbrainy r466 - trunk/src
- Date: Sun, 19 Oct 2008 13:09:29 +0000 (UTC)
Author: jmas
Date: Sun Oct 19 13:09:29 2008
New Revision: 466
URL: http://svn.gnome.org/viewvc/gbrainy?rev=466&view=rev
Log:
2008-10-19 Jordi Mas <jmas softcatala org>
* CairoContextEx.cs: Dispose not used objects
Modified:
trunk/src/CairoContextEx.cs
trunk/src/ChangeLog
trunk/src/PlayerHistory.cs
Modified: trunk/src/CairoContextEx.cs
==============================================================================
--- trunk/src/CairoContextEx.cs (original)
+++ trunk/src/CairoContextEx.cs Sun Oct 19 13:09:29 2008
@@ -92,8 +92,11 @@
#if GTK_2_8
#else
double resolution = widget.Screen.Resolution;
- if (resolution != -1)
- Pango.CairoHelper.ContextSetResolution (layout.Context, resolution);
+ if (resolution != -1) {
+ Pango.Context c = layout.Context;
+ Pango.CairoHelper.ContextSetResolution (c, resolution);
+ c.Dispose ();
+ }
#endif
}
@@ -118,7 +121,7 @@
// No dispose of resources on this class
protected override void Dispose (bool disposing)
{
-
+ layout.Dispose ();
}
private void UpdateFontSize ()
@@ -315,6 +318,7 @@
Source = shadow;
Fill ();
Restore ();
+ ((IDisposable)shadow).Dispose ();
}
public void FillGradient (double x, double y, double w, double h, Cairo.Color color)
@@ -326,6 +330,7 @@
Source = shadow;
Fill ();
Restore ();
+ ((IDisposable)shadow).Dispose ();
}
virtual public void DrawBackground ()
Modified: trunk/src/PlayerHistory.cs
==============================================================================
--- trunk/src/PlayerHistory.cs (original)
+++ trunk/src/PlayerHistory.cs Sun Oct 19 13:09:29 2008
@@ -60,10 +60,10 @@
public void SaveGameSession (GameSession session)
{
- GameHistory history = new GameHistory ();
-
if (session.GamesPlayed < gbrainy.preferences.GetIntValue (Preferences.MinPlayedGamesKey))
return;
+
+ GameHistory history = new GameHistory ();
history.games_played = session.GamesPlayed;
history.games_won = session.GamesWon;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]