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 "Playlist.h" 11 #include "PlaylistItem.h" 12 13 14 using std::nothrow; 15 16 17 PLItemsCommand::PLItemsCommand() 18 : 19 Command() 20 { 21 } 22 23 24 PLItemsCommand::~PLItemsCommand() 25 { 26 } 27 28 29 void 30 PLItemsCommand::_CleanUp(PlaylistItem**& items, int32 count, bool deleteItems) 31 { 32 if (items == NULL) 33 return; 34 if (deleteItems) { 35 for (int32 i = 0; i < count; i++) 36 items[i]->RemoveReference(); 37 } 38 delete[] items; 39 items = NULL; 40 } 41 42