[maemo-commits] [maemo-commits] r18454 - in projects/haf/trunk/libmatchbox2: . matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu May 21 17:15:48 EEST 2009
- Previous message: [maemo-commits] r18453 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core
- Next message: [maemo-commits] r18455 - in projects/haf/trunk/libmatchbox2: . matchbox/core
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-05-21 17:15:47 +0300 (Thu, 21 May 2009) New Revision: 18454 Modified: projects/haf/trunk/libmatchbox2/ChangeLog projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.c Log: matchbox/core/mb-wm-object.c (mb_wm_object_init): Do not allocate ObjectClasses and ObjectClassesInfo every time the function is called. Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-05-21 13:57:59 UTC (rev 18453) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-05-21 14:15:47 UTC (rev 18454) @@ -1,5 +1,8 @@ 2009-05-21 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + * matchbox/core/mb-wm-object.c (mb_wm_object_init): Do not allocate + ObjectClasses and ObjectClassesInfo every time the function is called. + * matchbox/core/mb-wm-client.c (mb_wm_client_destroy): Free decor list after unreffing the objects in the list. Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.c 2009-05-21 13:57:59 UTC (rev 18453) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-object.c 2009-05-21 14:15:47 UTC (rev 18454) @@ -83,11 +83,15 @@ void mb_wm_object_init(void) { - ObjectClasses = mb_wm_util_malloc0 (sizeof(void*) * N_CLASSES_PREALLOC); - ObjectClassesInfo = mb_wm_util_malloc0 (sizeof(void*) * N_CLASSES_PREALLOC); + if (!ObjectClasses || !ObjectClassesInfo) + { + ObjectClasses = mb_wm_util_malloc0 (sizeof(void*) * N_CLASSES_PREALLOC); + ObjectClassesInfo = mb_wm_util_malloc0 ( + sizeof(void*) * N_CLASSES_PREALLOC); - if (ObjectClasses && ObjectClassesInfo) - ObjectClassesAllocated = N_CLASSES_PREALLOC; + if (ObjectClasses && ObjectClassesInfo) + ObjectClassesAllocated = N_CLASSES_PREALLOC; + } } static void
- Previous message: [maemo-commits] r18453 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core
- Next message: [maemo-commits] r18455 - in projects/haf/trunk/libmatchbox2: . matchbox/core
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]