#include <MemoryChecker.h>
Static Public Member Functions | |
void | initialize () |
メモリ初期化 | |
State | getState () |
メモリステートの取得 | |
void | dumpDetail () |
詳細ダンプ | |
void | dumpDetail (const State &oldState) |
詳細の差分ダンプ | |
void | dumpStatistics () |
統計のダンプ | |
void | dumpStatistics (const State &oldState) |
統計の差分ダンプ | |
bool | leakCheck (const State &oldState) |
メモリリークチェック |
メモリリークを検出する為のクラスです。
システム初期化時に MemoryChecker::initialize()を呼んで下さい。
サンプルコード
// 初期化 MemoryChecker::initialize();
// メモリの詳細な情報をダンプ MemoryChecker::dumpDetail(); // メモリの統計情報をダンプ MemoryChecker::dumpStatistics();
// 現在のメモリステートを取得 MemoryChecker::State state = MemoryChecker::getState();
// メモリを使用する処理 allocateMemoryMethod();
// allocateMemoryMethod()で使用したメモリの詳細な情報をダンプ MemoryChecker::dumpDetail(state); // allocateMemoryMethod()で使用したメモリの統計情報をダンプ MemoryChecker::dumpStatistics(state);
// メモリを解放する処理 freeMemoryMethod();
// freeMemoryMethodでちゃんとメモリが解放されているかチェックする MemoryChecker::leakCheck(state);
Definition at line 77 of file MemoryChecker.h.
Member Function Documentation
|
詳細の差分ダンプ メモリ差分の詳細な情報ををデバッグ出力にダンプします。
Definition at line 63 of file MemoryChecker.cpp. References Lamp::MemoryChecker::State::state. |
|
詳細ダンプ メモリの詳細な情報ををデバッグ出力にダンプします。 Definition at line 58 of file MemoryChecker.cpp. References NULL. |
|
統計の差分ダンプ メモリ差分の統計情報をデバッグ出力にダンプします。
Definition at line 75 of file MemoryChecker.cpp. References Lamp::MemoryChecker::State::state. |
|
統計のダンプ メモリの統計情報をデバッグ出力にダンプします。 Definition at line 68 of file MemoryChecker.cpp. References Lamp::MemoryChecker::State::state. |
|
メモリステートの取得
Definition at line 51 of file MemoryChecker.cpp. References Lamp::MemoryChecker::State::state. |
|
メモリ初期化 システムの初期化時に一度だけ呼んで下さい。 Definition at line 39 of file MemoryChecker.cpp. |
|
メモリリークチェック メモリリークをチェックします。 メモリ使用量が同じ場合はリークを検出できません。 メモリ使用量が同じでリークを検出するにはdumpDetailを使用してください。
Definition at line 83 of file MemoryChecker.cpp. References DebugOut, DebugOutLine, DebugOutThickLine, and Lamp::MemoryChecker::State::state. |