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