How to assign separate memory spaces of same type of class
<p>Hi my program adds small Images to main view. I have this undo button to remove recently added Image(subView). It works ok when it has all different Images, But when there are two same images it occurs error.
I think this is because it both points the same original png file. But I have no idea how to fix it. Please give me some hint.</p>

<pre><code>add{  
    UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"pah%d",tagNum]];
    TouchImageView *touchImageView = [[TouchImageView alloc] initWithFrame:imageRect];
    imageCounter++;
    touchImageView.tag = imageCounter;
    touchImageView.image = image;
    touchImageView.center = CGPointMake(160.0, 230.0);
    [view addSubview:touchImageView];
}

undo{
       [[self.view viewWithTag:imageCounter] removeFromSuperview];
    imageCounter--;
}
</code></pre>
