Add phonebook example
Ensure brief locking while avoiding space leaks