implement dispose per msdn recommendation.