{"action":"opened","issue":{"url":"https://api.github.com/repos/processing/processing/issues/4259","labels_url":"https://api.github.com/repos/processing/processing/issues/4259/labels{/name}","comments_url":"https://api.github.com/repos/processing/processing/issues/4259/comments","events_url":"https://api.github.com/repos/processing/processing/issues/4259/events","html_url":"https://github.com/processing/processing/issues/4259","id":130004166,"number":4259,"title":"Huge memory Leak with createFont() in P2D and P3D","user":{"login":"StanLepunK","id":3332269,"avatar_url":"https://avatars.githubusercontent.com/u/3332269?v=3","gravatar_id":"","url":"https://api.github.com/users/StanLepunK","html_url":"https://github.com/StanLepunK","followers_url":"https://api.github.com/users/StanLepunK/followers","following_url":"https://api.github.com/users/StanLepunK/following{/other_user}","gists_url":"https://api.github.com/users/StanLepunK/gists{/gist_id}","starred_url":"https://api.github.com/users/StanLepunK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StanLepunK/subscriptions","organizations_url":"https://api.github.com/users/StanLepunK/orgs","repos_url":"https://api.github.com/users/StanLepunK/repos","events_url":"https://api.github.com/users/StanLepunK/events{/privacy}","received_events_url":"https://api.github.com/users/StanLepunK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-30T16:13:41Z","updated_at":"2016-01-30T16:13:41Z","closed_at":null,"body":"Mac OSX 10.8 / Processing 3.0.1\r\nWhen font is created with createFont() in the draw() and used with textFont(), the method textFont() open a memory leak.\r\nOnly with P2D, P3D not with FX2D, JAVA2D and default Mode\r\n\r\n\r\n````\r\nPFont font ;\r\nvoid setup() {\r\n  size(200,200,P3D) ;\r\n  // font = createFont(\"SansSerif\",10) ; // if we create font here there is no memory leak\r\n}\r\n\r\nvoid draw() {\r\n  font = createFont(\"SansSerif\",10) ; // if we create the font here there is a possibility of memory leak\r\n  textFont(font, 10) ; // if this line is comment there is no memory leak\r\n  text(\"TRUC\",10,10) ;\r\n}\r\n``````"}}