diff -r 5de72ea7a065 -r 579cc610882e calendarui/customisationmanager/src/calencustomisationmanager.cpp --- a/calendarui/customisationmanager/src/calencustomisationmanager.cpp Wed Jun 23 18:11:28 2010 +0300 +++ b/calendarui/customisationmanager/src/calencustomisationmanager.cpp Tue Jul 06 14:14:56 2010 +0300 @@ -509,17 +509,19 @@ // Get a new services object from global data MCalenServices* services = iServicesFactory.NewServicesL(); - + CleanupStack::PushL( services ); // Creates the plugin and transfers ownership of the services // object to the plugin. CCalenCustomisation* plugin = CCalenCustomisation::CreateImplementationL( aPluginUid, services ); - - CleanupStack::PushL( plugin ); + CleanupStack::PushL( plugin ); // the plugin array takes ownership of the plugin AddPluginL( plugin, aPluginUid ); + + // Cleanup CleanupStack::Pop( plugin ); + CleanupStack::Pop( services ); TRACE_EXIT_POINT;