From: Michal MalĂ˝ Date: Sun, 28 Dec 2014 23:42:18 +0000 (+0100) Subject: Destroy Cairo objects to prevent memory leaks X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=6a47ab9952693c075f83538d29503db4f7c256b1;p=Nine-Q.git Destroy Cairo objects to prevent memory leaks --- diff --git a/bin/nine_q_config.ini b/bin/nine_q_config.ini index f5aa0ef..f767ac3 100644 --- a/bin/nine_q_config.ini +++ b/bin/nine_q_config.ini @@ -1,5 +1,5 @@ Server_Port 18400 -Max_Connection 1000 +Max_Connection 50 Session True Session_Lifetime 1800.0 diff --git a/src/problem_generators/problem_generator-titration_curve_suite.adb b/src/problem_generators/problem_generator-titration_curve_suite.adb index 32f4c52..4034a35 100644 --- a/src/problem_generators/problem_generator-titration_curve_suite.adb +++ b/src/problem_generators/problem_generator-titration_curve_suite.adb @@ -7,6 +7,7 @@ with Ada.Strings.Unbounded; with Formatting_Helpers; with Cairo.Png; with Cairo.Image_Surface; +with Cairo.Surface; with Glib; with Interfaces.C; with Interfaces.C.Strings; @@ -184,6 +185,8 @@ package body Titration_Curve_Suite is FillIns.Insert(FILLIN_5_VOL_KEY, Answer.Element(ANSWER_VOLUME_SECOND_EQUIV_KEY)); FillIns.Insert(FILLIN_6_VOL_KEY, Answer.Element(ANSWER_VOLUME_OVER_SECOND_EQUIV_KEY)); + Cairo.Surface.Destroy(Surface); + Cairo.Destroy(Ctx); return Correct_Answer; end Check_Answer;