{"action":"created","issue":{"url":"https://api.github.com/repos/SodiumFRP/sodium/issues/85","repository_url":"https://api.github.com/repos/SodiumFRP/sodium","labels_url":"https://api.github.com/repos/SodiumFRP/sodium/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/SodiumFRP/sodium/issues/85/comments","events_url":"https://api.github.com/repos/SodiumFRP/sodium/issues/85/events","html_url":"https://github.com/SodiumFRP/sodium/issues/85","id":138182542,"number":85,"title":"typescript porting question","user":{"login":"Ziriax","id":2389359,"avatar_url":"https://avatars.githubusercontent.com/u/2389359?v=3","gravatar_id":"","url":"https://api.github.com/users/Ziriax","html_url":"https://github.com/Ziriax","followers_url":"https://api.github.com/users/Ziriax/followers","following_url":"https://api.github.com/users/Ziriax/following{/other_user}","gists_url":"https://api.github.com/users/Ziriax/gists{/gist_id}","starred_url":"https://api.github.com/users/Ziriax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ziriax/subscriptions","organizations_url":"https://api.github.com/users/Ziriax/orgs","repos_url":"https://api.github.com/users/Ziriax/repos","events_url":"https://api.github.com/users/Ziriax/events{/privacy}","received_events_url":"https://api.github.com/users/Ziriax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-03T13:52:25Z","updated_at":"2016-03-03T15:50:58Z","closed_at":null,"body":"Mainly for fun and to understand the code-base in depth, I started porting the c# version of sodium to Typescript.\r\n\r\nNow, the Node class uses a WeakReference to the action. \r\n\r\nUnfortunately Javascript does not have weak refs yet... The ES6 WeakMap is also not suitable for implementing weak even listeners.\r\n\r\nhttps://esdiscuss.org/topic/weak-event-listener\r\n\r\nWould it be ok to require an explicit unlisten call to cleanup memory, as in RX?"},"comment":{"url":"https://api.github.com/repos/SodiumFRP/sodium/issues/comments/191822845","html_url":"https://github.com/SodiumFRP/sodium/issues/85#issuecomment-191822845","issue_url":"https://api.github.com/repos/SodiumFRP/sodium/issues/85","id":191822845,"user":{"login":"jam40jeff","id":4641592,"avatar_url":"https://avatars.githubusercontent.com/u/4641592?v=3","gravatar_id":"","url":"https://api.github.com/users/jam40jeff","html_url":"https://github.com/jam40jeff","followers_url":"https://api.github.com/users/jam40jeff/followers","following_url":"https://api.github.com/users/jam40jeff/following{/other_user}","gists_url":"https://api.github.com/users/jam40jeff/gists{/gist_id}","starred_url":"https://api.github.com/users/jam40jeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jam40jeff/subscriptions","organizations_url":"https://api.github.com/users/jam40jeff/orgs","repos_url":"https://api.github.com/users/jam40jeff/repos","events_url":"https://api.github.com/users/jam40jeff/events{/privacy}","received_events_url":"https://api.github.com/users/jam40jeff/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T15:50:58Z","updated_at":"2016-03-03T15:50:58Z","body":"You are correct that the \"node\" is not created until the observable is observed in Rx.  In Sodium, the intermediate primitives begin listening right away.  I believe this may be necessary for the topological sort which allows for the glitch-free merge implementation, but I am not sure.  That would probably be a better question for @the-real-blackh."}}