[sc-memory] Save repository state ( #139) Fix deadlock on element free (#163)