fixed the error that an EXC_BAD_ACCESS error(code EXC_I386_GPFLT) occurred after delegate been released.