{"action":"created","issue":{"url":"https://api.github.com/repos/hpicgs/globjects/issues/283","labels_url":"https://api.github.com/repos/hpicgs/globjects/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/hpicgs/globjects/issues/283/comments","events_url":"https://api.github.com/repos/hpicgs/globjects/issues/283/events","html_url":"https://github.com/hpicgs/globjects/pull/283","id":60135371,"number":283,"title":"Explicit memory management (closes #276)","user":{"login":"scheibel","id":2247733,"avatar_url":"https://avatars.githubusercontent.com/u/2247733?v=3","gravatar_id":"","url":"https://api.github.com/users/scheibel","html_url":"https://github.com/scheibel","followers_url":"https://api.github.com/users/scheibel/followers","following_url":"https://api.github.com/users/scheibel/following{/other_user}","gists_url":"https://api.github.com/users/scheibel/gists{/gist_id}","starred_url":"https://api.github.com/users/scheibel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scheibel/subscriptions","organizations_url":"https://api.github.com/users/scheibel/orgs","repos_url":"https://api.github.com/users/scheibel/repos","events_url":"https://api.github.com/users/scheibel/events{/privacy}","received_events_url":"https://api.github.com/users/scheibel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-06T17:52:21Z","updated_at":"2015-03-08T18:11:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hpicgs/globjects/pulls/283","html_url":"https://github.com/hpicgs/globjects/pull/283","diff_url":"https://github.com/hpicgs/globjects/pull/283.diff","patch_url":"https://github.com/hpicgs/globjects/pull/283.patch"},"body":"Current solution to remove ```ref_ptr``` in globjects.\r\n\r\nOpen issues\r\n* test bindless textures\r\n* adapt to osg example\r\n* restructure ShaderIncludeProcessor to get rid of memory leak\r\n* restructure global replacements to get rid of memory leak\r\n* restructure NamedStrings to get rid of memory leak\r\n* rethink interface to get program binary from program (currently a memory leak)\r\n\r\nWhat is your impression on the changes and implications on depending libraries / programs?"},"comment":{"url":"https://api.github.com/repos/hpicgs/globjects/issues/comments/77765158","html_url":"https://github.com/hpicgs/globjects/pull/283#issuecomment-77765158","issue_url":"https://api.github.com/repos/hpicgs/globjects/issues/283","id":77765158,"user":{"login":"scheibel","id":2247733,"avatar_url":"https://avatars.githubusercontent.com/u/2247733?v=3","gravatar_id":"","url":"https://api.github.com/users/scheibel","html_url":"https://github.com/scheibel","followers_url":"https://api.github.com/users/scheibel/followers","following_url":"https://api.github.com/users/scheibel/following{/other_user}","gists_url":"https://api.github.com/users/scheibel/gists{/gist_id}","starred_url":"https://api.github.com/users/scheibel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scheibel/subscriptions","organizations_url":"https://api.github.com/users/scheibel/orgs","repos_url":"https://api.github.com/users/scheibel/repos","events_url":"https://api.github.com/users/scheibel/events{/privacy}","received_events_url":"https://api.github.com/users/scheibel/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T18:11:38Z","updated_at":"2015-03-08T18:11:38Z","body":"> This does not compile on MSVC because ```unique_ptr```s can't be used with forward declared types (produces ```error C2338: can't delete an incomplete type```).\r\n\r\nQuite unfortunate, but this can be fixed.\r\n\r\n> While allowing explicit memory management might generally be a good idea, I think in the current state the price in terms of convenience loss is much too high. My primary concern here is the whole StringSource/Shader/Progam/Uniform architecture that now easily requires managing 10 or more pointers (e.g. 3 Shaders, 3 StringSources, 1 Program, 2 Uniforms) instead of a single one.\r\n\r\nThe issue with Uniforms can be addressed using ```UniformGroup``` (in [gloperate](https://github.com/hpicgs/gloperate/blob/master/source/gloperate/include/gloperate/primitives/UniformGroup.h)) or ```UniformManager``` (probably integrated into gloperate).\r\nThe issue with the shaders and their sources (as well as the ```IncludeProcessor``` restructuring) can be fixed with declaring pointer ownership of shaders over their shader sources, but with the drawback of denied sharing of sources between shaders.\r\nThe same sharing argument can be applied between the sharing of shaders between programs (and uniforms and programs).\r\n\r\n> Further, I think the ```IncludeProcessor``` should remain here, as it directly emulates OpenGL functionality. The current ```ShadingLanguageIncludeImplementation``` architecture allows the transparent fallback, which would not be possible with the ```IncludeProcessor``` living elsewhere.\r\n\r\nThis decision should be based on the granularity of object oriented wrapping intended by globjects. If we intend to provide just a simple object-oriented wrapper around OpenGL, such a feature wouldn't fit in there. gloperate is designed to provide more graphics-rendering-engine-like functionalities, so emulating such complex feature would fit there just fine.\r\nCurrently, globjects supports several convenience features that are not part of a strict OpenGL object oriented interface but a rendering engine.\r\nEither we should reconsider the current abstraction in globjects or try live with the consequences."}}