{"action":"created","issue":{"url":"https://api.github.com/repos/appsquickly/Typhoon/issues/462","labels_url":"https://api.github.com/repos/appsquickly/Typhoon/issues/462/labels{/name}","comments_url":"https://api.github.com/repos/appsquickly/Typhoon/issues/462/comments","events_url":"https://api.github.com/repos/appsquickly/Typhoon/issues/462/events","html_url":"https://github.com/appsquickly/Typhoon/issues/462","id":122346364,"number":462,"title":"Why is prototype scope not working?","user":{"login":"thefenix1","id":10436237,"avatar_url":"https://avatars.githubusercontent.com/u/10436237?v=3","gravatar_id":"","url":"https://api.github.com/users/thefenix1","html_url":"https://github.com/thefenix1","followers_url":"https://api.github.com/users/thefenix1/followers","following_url":"https://api.github.com/users/thefenix1/following{/other_user}","gists_url":"https://api.github.com/users/thefenix1/gists{/gist_id}","starred_url":"https://api.github.com/users/thefenix1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefenix1/subscriptions","organizations_url":"https://api.github.com/users/thefenix1/orgs","repos_url":"https://api.github.com/users/thefenix1/repos","events_url":"https://api.github.com/users/thefenix1/events{/privacy}","received_events_url":"https://api.github.com/users/thefenix1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appsquickly/Typhoon/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-15T19:26:11Z","updated_at":"2016-01-07T12:02:18Z","closed_at":null,"body":"I have the following `Typhoon` configuration method inside an assembly\r\n\r\n    dynamic func myClassMapping() -> AnyObject {\r\n        return TyphoonDefinition.withClass(MyClass.self) {\r\n            (definition) in\r\n            \r\n            definition.scope = TyphoonScope.Prototype\r\n        }\r\n    }\r\n\r\nSo far I understand, this should be causing no instance of `MyClass` to be resused. Despite of this, I'm seeing same instance injected (checked memory address on console) on different places. It's 100% checked that these places are different, not event the same class.\r\n\r\nHow could I make sure a new instance is always injected?\r\n\r\nI've also created a [question on stackoverflow](http://stackoverflow.com/questions/34295143/why-is-prototype-scope-not-working) in case that's a better place for this question. \r\n\r\nI know that I might be missing information you could want to see but before pasting hundred of lines here I wanted to check if you have in mind any situation where Prototype scope doesn't behave as explained on wiki\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/appsquickly/Typhoon/issues/comments/169643107","html_url":"https://github.com/appsquickly/Typhoon/issues/462#issuecomment-169643107","issue_url":"https://api.github.com/repos/appsquickly/Typhoon/issues/462","id":169643107,"user":{"login":"thefenix1","id":10436237,"avatar_url":"https://avatars.githubusercontent.com/u/10436237?v=3","gravatar_id":"","url":"https://api.github.com/users/thefenix1","html_url":"https://github.com/thefenix1","followers_url":"https://api.github.com/users/thefenix1/followers","following_url":"https://api.github.com/users/thefenix1/following{/other_user}","gists_url":"https://api.github.com/users/thefenix1/gists{/gist_id}","starred_url":"https://api.github.com/users/thefenix1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefenix1/subscriptions","organizations_url":"https://api.github.com/users/thefenix1/orgs","repos_url":"https://api.github.com/users/thefenix1/repos","events_url":"https://api.github.com/users/thefenix1/events{/privacy}","received_events_url":"https://api.github.com/users/thefenix1/received_events","type":"User","site_admin":false},"created_at":"2016-01-07T12:02:18Z","updated_at":"2016-01-07T12:02:18Z","body":"You can close this reference loop perfectly explains what I see. Obviusly you have to cut the loop in some way to avoid an infinite injection process. Sorry for not catching this and thanks for the support."}}