The main problem here is with reference count. You should use this mechanism and properly protect access to data with brackets inc/dec -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171108/a5967d43/attachment.htm>