add bean destroy method
NPE fix

Signed-off-by: 黄小虎 <velna_007@163.com>