{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/7303","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/7303/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/7303/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/7303/events","html_url":"https://github.com/godotengine/godot/issues/7303","id":195845494,"number":7303,"title":"Quad Nodes leak memory","user":{"login":"SolarMongoose","id":15483613,"avatar_url":"https://avatars.githubusercontent.com/u/15483613?v=3","gravatar_id":"","url":"https://api.github.com/users/SolarMongoose","html_url":"https://github.com/SolarMongoose","followers_url":"https://api.github.com/users/SolarMongoose/followers","following_url":"https://api.github.com/users/SolarMongoose/following{/other_user}","gists_url":"https://api.github.com/users/SolarMongoose/gists{/gist_id}","starred_url":"https://api.github.com/users/SolarMongoose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolarMongoose/subscriptions","organizations_url":"https://api.github.com/users/SolarMongoose/orgs","repos_url":"https://api.github.com/users/SolarMongoose/repos","events_url":"https://api.github.com/users/SolarMongoose/events{/privacy}","received_events_url":"https://api.github.com/users/SolarMongoose/received_events","type":"User","site_admin":false},"labels":[{"id":73330064,"url":"https://api.github.com/repos/godotengine/godot/labels/bug","name":"bug","color":"ff2222","default":true},{"id":279128044,"url":"https://api.github.com/repos/godotengine/godot/labels/confirmed","name":"confirmed","color":"66dd66","default":false},{"id":279097966,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:core","name":"topic:core","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-15T16:09:16Z","updated_at":"2016-12-16T11:35:21Z","closed_at":null,"body":"**Operating system or device - Godot version:**\r\nTested and observed in both 2.0.1 on Windows 7 and 2.1.1 on Windows 10\r\n\r\n**Issue description** (what happened, and what was expected):\r\n![memoirs](https://cloud.githubusercontent.com/assets/15483613/21231391/ba7eb888-c2ad-11e6-948d-5ee1617339f8.png)\r\nThis here number goes up when instancing a Quad, but never goes down when freeing it.\r\n\r\n**Steps to reproduce:**\r\nCreate a quad. Try to free it.\r\n\r\n**Link to minimal example project** (optional but very welcome):\r\n[Quad Test.zip](https://github.com/godotengine/godot/files/655148/Quad.Test.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/267575821","html_url":"https://github.com/godotengine/godot/issues/7303#issuecomment-267575821","issue_url":"https://api.github.com/repos/godotengine/godot/issues/7303","id":267575821,"user":{"login":"bojidar-bg","id":5276727,"avatar_url":"https://avatars.githubusercontent.com/u/5276727?v=3","gravatar_id":"","url":"https://api.github.com/users/bojidar-bg","html_url":"https://github.com/bojidar-bg","followers_url":"https://api.github.com/users/bojidar-bg/followers","following_url":"https://api.github.com/users/bojidar-bg/following{/other_user}","gists_url":"https://api.github.com/users/bojidar-bg/gists{/gist_id}","starred_url":"https://api.github.com/users/bojidar-bg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bojidar-bg/subscriptions","organizations_url":"https://api.github.com/users/bojidar-bg/orgs","repos_url":"https://api.github.com/users/bojidar-bg/repos","events_url":"https://api.github.com/users/bojidar-bg/events{/privacy}","received_events_url":"https://api.github.com/users/bojidar-bg/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T11:35:21Z","updated_at":"2016-12-16T11:35:21Z","body":"The mesh is created here: https://github.com/godotengine/godot/blob/master/scene/3d/quad.cpp#L228\r\nSeems like VisualServer doesn't clean meshes of freed instances (which is very, very good :laughing:), but, this mesh specifically is used only by this Quad node (not shared). That's why it should free this RID in the yet nonexistent `Quad::~Quad` destructor, like this (probably):\r\n```c++\r\nQuad::~Quad() {\r\n  VisualServer::get_singleton()->free(mesh);\r\n}\r\n```"}}
{"actor":{"display_login":"bojidar-bg"}}