diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-A18153C0-230C-51FB-9384-A48BB4E42F03.dita --- a/Symbian3/PDK/Source/GUID-A18153C0-230C-51FB-9384-A48BB4E42F03.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-A18153C0-230C-51FB-9384-A48BB4E42F03.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,37 +1,37 @@ - - - - - -Cleanup -StrategyThe support for custom cleanup strategies is based on a template-based -implementation of the Strategy design pattern. Cleanup strategies can be specified -as an optional template parameter of the class templates for automatic resource -management. -
Default Cleanup Strategy

The default cleanup strategy -is determined by the TResourceCleanupStrategy class template -which by default calls a function named Cleanup() function. -The DEFINE_CLEANUP_FUNCTION macro defines an inline function -named Cleanup() function which is invoked for cleanup of the managed object -in place of the default CallCleanupFunction function defined in the header -file.

-
DEFINE_CLEANUP_FUNCTION Macro

DEFINE_CLEANUP_FUNCTION is -provided in order to enable Symbian Developers to easily define the default -cleanup member function for a class type, such as an R-class. The macro can -be used in the same namespace in which the R-class is defined or in a namespace -in which the R-class is used. The DEFINE_CLEANUP_FUNCTION can be used by class -designers, but if a class does not have a cleanup function specified, then -the class users can use the DEFINE_CLEANUP_FUNCTION in order to define the -default cleanup function for that class.

-Clean-up Strategy example DEFINE_CLEANUP_FUNCTION(RSimple, ReleaseData);

This sets the default cleanup behaviour for the RSimple class to be RSimple::ReleaseData(). -If this Macro is not used then the default cleanup behaviour would be to call RSimple::Close().

-
-Cleanup Strategy -Tutorial + + + + + +Cleanup +StrategyThe support for custom cleanup strategies is based on a template-based +implementation of the Strategy design pattern. Cleanup strategies can be specified +as an optional template parameter of the class templates for automatic resource +management. +
Default Cleanup Strategy

The default cleanup strategy +is determined by the TResourceCleanupStrategy class template +which by default calls a function named Cleanup() function. +The DEFINE_CLEANUP_FUNCTION macro defines an inline function +named Cleanup() function which is invoked for cleanup of the managed object +in place of the default CallCleanupFunction function defined in the header +file.

+
DEFINE_CLEANUP_FUNCTION Macro

DEFINE_CLEANUP_FUNCTION is +provided in order to enable Symbian Developers to easily define the default +cleanup member function for a class type, such as an R-class. The macro can +be used in the same namespace in which the R-class is defined or in a namespace +in which the R-class is used. The DEFINE_CLEANUP_FUNCTION can be used by class +designers, but if a class does not have a cleanup function specified, then +the class users can use the DEFINE_CLEANUP_FUNCTION in order to define the +default cleanup function for that class.

+Clean-up Strategy example DEFINE_CLEANUP_FUNCTION(RSimple, ReleaseData);

This sets the default cleanup behaviour for the RSimple class to be RSimple::ReleaseData(). +If this Macro is not used then the default cleanup behaviour would be to call RSimple::Close().

+
+Cleanup Strategy +Tutorial
\ No newline at end of file