Changing global variable for local variable to prevent memory leaks

The array mTmpObjArray is not properly clean but ther is no need
for the array to be global since every time is used is provided
so a use of a local variable will make sure is never leaked.

Fix: 269163620
Test: the flake related to memory leak on testWorkspace should dissapear
Change-Id: I29fb3dd6419f621f2ccce9db2fc5ed86358f7516
1 file changed