can I add same ccspirit object after remove it?

I have total 20 images in NSMutableArray of ccspirit objects, and I want to show them on screen moving moving upward, I add them to as [self addChild:p] as below

-(void) callMethod {
static int x = 50;  
if (x>=0) {
Paddle  *p = [paddlesFruits objectAtIndex:x];
p.position = CGPointMake(40,0);
[self addChild:p];
[self moveMethod1: p];
[p release];
}else {

and the method which will move it upside is

-(void) moveMethod1 : (id) sender {

id actionMove2 = [CCMoveTo actionWithDuration:6 position:ccp(40, 520)];

id actionMoveDone2 = [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)];

[sender runAction:[CCSequence actions:actionMove2, actionMoveDone2, nil]];

-(void)spriteMoveFinished:(id)sender {

but after using addChild again and again, it will make it heavier, so what should I do, I am thinking to addChild and remove after certain time, I will removeChild, but is it possible to to add a ccspirit again after using removeChild for same ccspirit object?


Need Your Help

Real time database changes with Ajax

php javascript ajax database

I'm building a website that prints the content in it's Mysql database to the page for the user to see. The database's content is going to be constantly added to, and I want to show those changes in...

Add the default outlook signature in the email generated

c# winforms outlook-2003

I am using the Microsoft.Office.Interop.Outlook.Application to generate an email and display it on the screen before the user can send it. The application is a winform application coded in C# in th...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.