I want to add a button on a view dynamically. Here is the code.
UIButton *x=[UIButton buttonWithType:UIButtonTypeRoundedRect];
Here, I have not used "alloc" function.
The questions for this statements are as follow.
- If we are using imageview for the same situation, we have to create an temp imageview add to your current view and release it. What to do for button?
- How are buttons allocated and de-allocated?
- If buttons are allocated? How it's memory is been managed?
- Now when I use [x release]; - is it right or wrong?