ConditonA:
//declare mybutton object and point to null;
Button mybutton ;
//mybutton point to the instance of layout_button
mybutton = (Button)findViewByid(R.id.layout_button);
CondtionB:
//declare mybutton object and point to new Button object;
Button mybutton = new Button(this);
//mybutton repoint to the instance of layout_button
mybutton = (Button)findViewByid(R.id.layout_button);
// previous new Button(this) should be recycle??
Hi all
As above example , i found many sample code use Condition B ,but i don't know what's the benefit of it. Should it result in garbage???