patched a possible gpu memory leak - unlikely to be the cause of previous hanging but best to plug it anyway.