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 16 using std::nothrow; 17 18 19 PLItemsCommand::PLItemsCommand() 20 : 21 Command() 22 { 23 } 24 25 26 PLItemsCommand::~PLItemsCommand() 27 { 28 } 29 30 31 void 32 PLItemsCommand::_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]->RemoveReference(); 39 } 40 delete[] items; 41 items = NULL; 42 } 43 44