I need to know if there OutOfMemmory happens and I added the following piece of code to my program. but it is not working properly. what would be the problem with that?