Browse files

more to read

  • Loading branch information...
1 parent 3cc1c8a commit 97dc0bfb612267089e7e42fa67249515df737029 @tonyrog committed Jan 2, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 README
View
13 README
@@ -0,0 +1,13 @@
+Resource tracking
+=================
+
+resource:notify_when_destroyed(Pid, Message) -> NifRef.
+
+notify_when_destroyed creates a nif resource that can be used as a reference
+to any kind of external data. When resource is destroyed,
+beacuse it is not referenced any where, the destructor callback will
+send the message to Pid.
+
+For example, it could be used for wrapping
+file handles. The file is then closed automatically when there are no one
+referencing the file, there by garbage collect files.

0 comments on commit 97dc0bf

Please sign in to comment.