1/* 2 * Copyright 2009 Stephan A��mus <superstippi@gmx.de>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 6#include "PLItemsCommand.h" 7 8#include <stdio.h> 9 10#include <new> 11 12#include "Playlist.h" 13#include "PlaylistItem.h" 14 15 16using std::nothrow; 17 18 19PLItemsCommand::PLItemsCommand() 20 : 21 Command() 22{ 23} 24 25 26PLItemsCommand::~PLItemsCommand() 27{ 28} 29 30 31void 32PLItemsCommand::_CleanUp(PlaylistItem**& items, int32 count, bool deleteItems) 33{ 34 if (items == NULL) 35 return; 36 if (deleteItems) { 37 for (int32 i = 0; i < count; i++) 38 items[i]->ReleaseReference(); 39 } 40 delete[] items; 41 items = NULL; 42} 43 44