Release objects on a different thread to avoid race conditions

Change-Id: I3ced29b1092c3b0373d7bba5bd933a3e67248a67