In my application, every time when the connect button is pressed a new dialog is created. The dialog may contain different items every time, because the items are collected from the system. That will generate many objects of that type. Is that a bad practice? Will the garbage collector take care of it? Should i optimize the code and how?
pairedDevicesDialog = new AlertDialog.Builder(context);
Thanks!