Fixing processorgraph memory leak; adding processorgraph functionality