Added convenience method to make memory management easier for the UI layer.