void (LivePreview livePreview) { if (myLivePreview != null) { myLivePreview.dispose(); myLivePreview.setDelegate(null); } myLivePreview = livePreview; if (myLivePreview != null) { myLivePreview.setDelegate(this); } }