{"action":"created","comment":{"url":"https://api.github.com/repos/castle-engine/castle-engine/pulls/comments/75246690","id":75246690,"diff_hunk":"@@ -791,7 +794,7 @@ procedure TTiledMap.LoadTMXFile(AURL: string);\n begin\n   Doc := nil;\n   try\n-    ReadXMLFile(Doc, URIDeleteProtocol(AURL));  //todo: what is proper way to open files? (AbsoluteURI ?)\n+    ReadXMLFile(Doc, Download(AURL));","path":"src/ui/castletiledmap.pas","position":null,"original_position":15,"commit_id":"5771c1b7f24f38fd67a1f19631b7ce12fc07cea0","original_commit_id":"b70f0f6cd39f51ae96cddfe926f9aa435fe74550","user":{"login":"michaliskambi","id":1076978,"avatar_url":"https://avatars.githubusercontent.com/u/1076978?v=3","gravatar_id":"","url":"https://api.github.com/users/michaliskambi","html_url":"https://github.com/michaliskambi","followers_url":"https://api.github.com/users/michaliskambi/followers","following_url":"https://api.github.com/users/michaliskambi/following{/other_user}","gists_url":"https://api.github.com/users/michaliskambi/gists{/gist_id}","starred_url":"https://api.github.com/users/michaliskambi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaliskambi/subscriptions","organizations_url":"https://api.github.com/users/michaliskambi/orgs","repos_url":"https://api.github.com/users/michaliskambi/repos","events_url":"https://api.github.com/users/michaliskambi/events{/privacy}","received_events_url":"https://api.github.com/users/michaliskambi/received_events","type":"User","site_admin":false},"body":"@Kagamma , @tsr8 : Note that this line makes a memory leak, as \"Download(AURL)\" returns a new stream instance that is nowhere freed.\r\n\r\nThe easiest solution is to use \"URLReadXML(Doc, AURL)\". It is defined in CastleXMLUtils, and will free the stream as necessary. It's implementation (copied from CastleXMLUtils sources) is below:\r\n\r\n~~~~\r\nprocedure URLReadXML(out Doc: TXMLDocument; const URL: String);\r\nvar\r\n  Stream: TStream;\r\nbegin\r\n  Doc := nil; // clean \"out\" param at start, just like ReadXMLFile\r\n  Stream := Download(URL, []);\r\n  try\r\n    ReadXMLFile(Doc, Stream);\r\n  finally FreeAndNil(Stream) end;\r\nend;\r\n~~~~","created_at":"2016-08-18T04:15:09Z","updated_at":"2016-08-18T04:15:09Z","html_url":"https://github.com/castle-engine/castle-engine/pull/14#discussion_r75246690","pull_request_url":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/castle-engine/castle-engine/pulls/comments/75246690"},"html":{"href":"https://github.com/castle-engine/castle-engine/pull/14#discussion_r75246690"},"pull_request":{"href":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14","id":54210039,"html_url":"https://github.com/castle-engine/castle-engine/pull/14","diff_url":"https://github.com/castle-engine/castle-engine/pull/14.diff","patch_url":"https://github.com/castle-engine/castle-engine/pull/14.patch","issue_url":"https://api.github.com/repos/castle-engine/castle-engine/issues/14","number":14,"state":"open","locked":false,"title":"Tiled maps support","user":{"login":"tsr8","id":6218555,"avatar_url":"https://avatars.githubusercontent.com/u/6218555?v=3","gravatar_id":"","url":"https://api.github.com/users/tsr8","html_url":"https://github.com/tsr8","followers_url":"https://api.github.com/users/tsr8/followers","following_url":"https://api.github.com/users/tsr8/following{/other_user}","gists_url":"https://api.github.com/users/tsr8/gists{/gist_id}","starred_url":"https://api.github.com/users/tsr8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsr8/subscriptions","organizations_url":"https://api.github.com/users/tsr8/orgs","repos_url":"https://api.github.com/users/tsr8/repos","events_url":"https://api.github.com/users/tsr8/events{/privacy}","received_events_url":"https://api.github.com/users/tsr8/received_events","type":"User","site_admin":false},"body":"Created this request to show my progress with implementation of TMX files support (TCastleTiledMap component). Please review and comment. Decided to write it to separate .inc (like in CastleGLImages) file because CastleControls is so big.","created_at":"2015-12-20T22:42:39Z","updated_at":"2016-08-18T04:15:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2084688f4b080abb82d8b13c3cc419b7a12c5d6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14/commits","review_comments_url":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14/comments","review_comment_url":"https://api.github.com/repos/castle-engine/castle-engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/castle-engine/castle-engine/issues/14/comments","statuses_url":"https://api.github.com/repos/castle-engine/castle-engine/statuses/5771c1b7f24f38fd67a1f19631b7ce12fc07cea0","head":{"label":"tsr8:tiled","ref":"tiled","sha":"5771c1b7f24f38fd67a1f19631b7ce12fc07cea0","user":{"login":"tsr8","id":6218555,"avatar_url":"https://avatars.githubusercontent.com/u/6218555?v=3","gravatar_id":"","url":"https://api.github.com/users/tsr8","html_url":"https://github.com/tsr8","followers_url":"https://api.github.com/users/tsr8/followers","following_url":"https://api.github.com/users/tsr8/following{/other_user}","gists_url":"https://api.github.com/users/tsr8/gists{/gist_id}","starred_url":"https://api.github.com/users/tsr8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsr8/subscriptions","organizations_url":"https://api.github.com/users/tsr8/orgs","repos_url":"https://api.github.com/users/tsr8/repos","events_url":"https://api.github.com/users/tsr8/events{/privacy}","received_events_url":"https://api.github.com/users/tsr8/received_events","type":"User","site_admin":false},"repo":{"id":43843564,"name":"castle-engine","full_name":"tsr8/castle-engine","owner":{"login":"tsr8","id":6218555,"avatar_url":"https://avatars.githubusercontent.com/u/6218555?v=3","gravatar_id":"","url":"https://api.github.com/users/tsr8","html_url":"https://github.com/tsr8","followers_url":"https://api.github.com/users/tsr8/followers","following_url":"https://api.github.com/users/tsr8/following{/other_user}","gists_url":"https://api.github.com/users/tsr8/gists{/gist_id}","starred_url":"https://api.github.com/users/tsr8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsr8/subscriptions","organizations_url":"https://api.github.com/users/tsr8/orgs","repos_url":"https://api.github.com/users/tsr8/repos","events_url":"https://api.github.com/users/tsr8/events{/privacy}","received_events_url":"https://api.github.com/users/tsr8/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsr8/castle-engine","description":"Castle Game Engine code and examples","fork":true,"url":"https://api.github.com/repos/tsr8/castle-engine","forks_url":"https://api.github.com/repos/tsr8/castle-engine/forks","keys_url":"https://api.github.com/repos/tsr8/castle-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsr8/castle-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsr8/castle-engine/teams","hooks_url":"https://api.github.com/repos/tsr8/castle-engine/hooks","issue_events_url":"https://api.github.com/repos/tsr8/castle-engine/issues/events{/number}","events_url":"https://api.github.com/repos/tsr8/castle-engine/events","assignees_url":"https://api.github.com/repos/tsr8/castle-engine/assignees{/user}","branches_url":"https://api.github.com/repos/tsr8/castle-engine/branches{/branch}","tags_url":"https://api.github.com/repos/tsr8/castle-engine/tags","blobs_url":"https://api.github.com/repos/tsr8/castle-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsr8/castle-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsr8/castle-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsr8/castle-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsr8/castle-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/tsr8/castle-engine/languages","stargazers_url":"https://api.github.com/repos/tsr8/castle-engine/stargazers","contributors_url":"https://api.github.com/repos/tsr8/castle-engine/contributors","subscribers_url":"https://api.github.com/repos/tsr8/castle-engine/subscribers","subscription_url":"https://api.github.com/repos/tsr8/castle-engine/subscription","commits_url":"https://api.github.com/repos/tsr8/castle-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsr8/castle-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsr8/castle-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsr8/castle-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsr8/castle-engine/contents/{+path}","compare_url":"https://api.github.com/repos/tsr8/castle-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsr8/castle-engine/merges","archive_url":"https://api.github.com/repos/tsr8/castle-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsr8/castle-engine/downloads","issues_url":"https://api.github.com/repos/tsr8/castle-engine/issues{/number}","pulls_url":"https://api.github.com/repos/tsr8/castle-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/tsr8/castle-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/tsr8/castle-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsr8/castle-engine/labels{/name}","releases_url":"https://api.github.com/repos/tsr8/castle-engine/releases{/id}","deployments_url":"https://api.github.com/repos/tsr8/castle-engine/deployments","created_at":"2015-10-07T20:41:42Z","updated_at":"2016-04-01T22:17:57Z","pushed_at":"2016-08-12T22:33:27Z","git_url":"git://github.com/tsr8/castle-engine.git","ssh_url":"git@github.com:tsr8/castle-engine.git","clone_url":"https://github.com/tsr8/castle-engine.git","svn_url":"https://github.com/tsr8/castle-engine","homepage":"http://castle-engine.sourceforge.net/engine.php","size":252589,"stargazers_count":0,"watchers_count":0,"language":"Pascal","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"castle-engine:master","ref":"master","sha":"f20ce520ea12045240f0c0ffc1ce6a457417847f","user":{"login":"castle-engine","id":13562079,"avatar_url":"https://avatars.githubusercontent.com/u/13562079?v=3","gravatar_id":"","url":"https://api.github.com/users/castle-engine","html_url":"https://github.com/castle-engine","followers_url":"https://api.github.com/users/castle-engine/followers","following_url":"https://api.github.com/users/castle-engine/following{/other_user}","gists_url":"https://api.github.com/users/castle-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/castle-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/castle-engine/subscriptions","organizations_url":"https://api.github.com/users/castle-engine/orgs","repos_url":"https://api.github.com/users/castle-engine/repos","events_url":"https://api.github.com/users/castle-engine/events{/privacy}","received_events_url":"https://api.github.com/users/castle-engine/received_events","type":"Organization","site_admin":false},"repo":{"id":30114388,"name":"castle-engine","full_name":"castle-engine/castle-engine","owner":{"login":"castle-engine","id":13562079,"avatar_url":"https://avatars.githubusercontent.com/u/13562079?v=3","gravatar_id":"","url":"https://api.github.com/users/castle-engine","html_url":"https://github.com/castle-engine","followers_url":"https://api.github.com/users/castle-engine/followers","following_url":"https://api.github.com/users/castle-engine/following{/other_user}","gists_url":"https://api.github.com/users/castle-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/castle-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/castle-engine/subscriptions","organizations_url":"https://api.github.com/users/castle-engine/orgs","repos_url":"https://api.github.com/users/castle-engine/repos","events_url":"https://api.github.com/users/castle-engine/events{/privacy}","received_events_url":"https://api.github.com/users/castle-engine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/castle-engine/castle-engine","description":"Castle Game Engine code and examples","fork":false,"url":"https://api.github.com/repos/castle-engine/castle-engine","forks_url":"https://api.github.com/repos/castle-engine/castle-engine/forks","keys_url":"https://api.github.com/repos/castle-engine/castle-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/castle-engine/castle-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/castle-engine/castle-engine/teams","hooks_url":"https://api.github.com/repos/castle-engine/castle-engine/hooks","issue_events_url":"https://api.github.com/repos/castle-engine/castle-engine/issues/events{/number}","events_url":"https://api.github.com/repos/castle-engine/castle-engine/events","assignees_url":"https://api.github.com/repos/castle-engine/castle-engine/assignees{/user}","branches_url":"https://api.github.com/repos/castle-engine/castle-engine/branches{/branch}","tags_url":"https://api.github.com/repos/castle-engine/castle-engine/tags","blobs_url":"https://api.github.com/repos/castle-engine/castle-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/castle-engine/castle-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/castle-engine/castle-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/castle-engine/castle-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/castle-engine/castle-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/castle-engine/castle-engine/languages","stargazers_url":"https://api.github.com/repos/castle-engine/castle-engine/stargazers","contributors_url":"https://api.github.com/repos/castle-engine/castle-engine/contributors","subscribers_url":"https://api.github.com/repos/castle-engine/castle-engine/subscribers","subscription_url":"https://api.github.com/repos/castle-engine/castle-engine/subscription","commits_url":"https://api.github.com/repos/castle-engine/castle-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/castle-engine/castle-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/castle-engine/castle-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/castle-engine/castle-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/castle-engine/castle-engine/contents/{+path}","compare_url":"https://api.github.com/repos/castle-engine/castle-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/castle-engine/castle-engine/merges","archive_url":"https://api.github.com/repos/castle-engine/castle-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/castle-engine/castle-engine/downloads","issues_url":"https://api.github.com/repos/castle-engine/castle-engine/issues{/number}","pulls_url":"https://api.github.com/repos/castle-engine/castle-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/castle-engine/castle-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/castle-engine/castle-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/castle-engine/castle-engine/labels{/name}","releases_url":"https://api.github.com/repos/castle-engine/castle-engine/releases{/id}","deployments_url":"https://api.github.com/repos/castle-engine/castle-engine/deployments","created_at":"2015-01-31T14:26:37Z","updated_at":"2016-08-14T09:28:21Z","pushed_at":"2016-08-18T04:04:51Z","git_url":"git://github.com/castle-engine/castle-engine.git","ssh_url":"git@github.com:castle-engine/castle-engine.git","clone_url":"https://github.com/castle-engine/castle-engine.git","svn_url":"https://github.com/castle-engine/castle-engine","homepage":"http://castle-engine.sourceforge.net/engine.php","size":256184,"stargazers_count":25,"watchers_count":25,"language":"Pascal","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14"},"html":{"href":"https://github.com/castle-engine/castle-engine/pull/14"},"issue":{"href":"https://api.github.com/repos/castle-engine/castle-engine/issues/14"},"comments":{"href":"https://api.github.com/repos/castle-engine/castle-engine/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/castle-engine/castle-engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/castle-engine/castle-engine/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/castle-engine/castle-engine/statuses/5771c1b7f24f38fd67a1f19631b7ce12fc07cea0"}}}}
{"actor":{"display_login":"michaliskambi"}}