Releasing graph resources on form closing