CTR Pia  4.11.3
Game Communication Engine
nn::pia::common::MemoryLeakChecker Class Reference

This class is used to automatically detect memory leaks inside the Pia library. More...

Public Member Functions

 MemoryLeakChecker (void)
 Instantiates the object.
 
 ~MemoryLeakChecker (void)
 Destroys the object.
 
nn::Result Check (void) const
 Determines whether a memory leak has occurred. More...
 
nn::Result Set (void)
 Sets the starting point to check for memory leaks. More...
 

Detailed Description

This class is used to automatically detect memory leaks inside the Pia library.


Revision History:
2014-02-03 Improved the description of Set/Check.

Member Function Documentation

nn::Result nn::pia::common::MemoryLeakChecker::Check ( void  ) const

Determines whether a memory leak has occurred.

This API function is designed to be called after finalizing a Pia module that you suspect is leaking memory. Pia is designed to finalize modules in sequence, starting with the highest-level modules. If you suspect that higher-level modules, including the xxx module, are leaking memory, execute this API function after calling the nn::pia::xxxFinalize function.

Do not call this function between the BeginSetup and EndSetup functions of each module.

Returns
Returns a successful Result if the call completes without an error and no memory leak is suspected.
Error Return Values:

ResultMemoryLeak Returned if a memory leak is suspected. Programming error. Fix your program so that this error is not returned.

ResultNotInitialized Returned if the nn::pia::common::Initialize function has not been called. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Returned if this function is called at the wrong time. Call the nn::pia::common::EndSetup function at regular intervals. Programming error. Fix your program so that this error is not returned.

See also
Set
nn::Result nn::pia::common::MemoryLeakChecker::Set ( void  )

Sets the starting point to check for memory leaks.

This API function is designed to be called prior to starting an initialization process on a Pia module that you suspect is leaking memory. Pia is designed to first initialize the common module, and then initialize the higher-level modules in sequence. If you suspect that higher-level modules, including the xxx module, are leaking memory, execute this API function prior to calling the nn::pia::xxxInitialize function.

Do not call this function between the BeginSetup and EndSetup functions of each module.

Returns
Returns a successful Result if the call completes without an error.
Error Return Values:

ResultNotInitialized Returned if the nn::pia::common::Initialize function has not been called. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Returned if this function is called at the wrong time. Call the nn::pia::common::EndSetup function at regular intervals. Programming error. Fix your program so that this error is not returned.

See also
Check