fixed potential memory leak in json reference view