added data structures to support free calls by any thread