| Index: shell/src/GcCommand.cpp |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/shell/src/GcCommand.cpp |
| @@ -0,0 +1,21 @@ |
| +#include "GcCommand.h" |
| + |
| +GcCommand::GcCommand(AdblockPlus::JsEngine& jsEngine) |
| + : Command("gc"), jsEngine(jsEngine) |
| +{ |
| +} |
| + |
| +void GcCommand::operator()(const std::string& arguments) |
| +{ |
| + jsEngine.Gc(); |
| +} |
| + |
| +std::string GcCommand::GetDescription() const |
| +{ |
| + return "Initiates a garbage collection"; |
| +} |
| + |
| +std::string GcCommand::GetUsage() const |
| +{ |
| + return name; |
| +} |