{"action":"created","issue":{"url":"https://api.github.com/repos/Psychtoolbox-3/Psychtoolbox-3/issues/315","repository_url":"https://api.github.com/repos/Psychtoolbox-3/Psychtoolbox-3","labels_url":"https://api.github.com/repos/Psychtoolbox-3/Psychtoolbox-3/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/Psychtoolbox-3/Psychtoolbox-3/issues/315/comments","events_url":"https://api.github.com/repos/Psychtoolbox-3/Psychtoolbox-3/issues/315/events","html_url":"https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/315","id":133375192,"number":315,"title":"Memory Leak Drawing to Screen","user":{"login":"ljchang","id":2993338,"avatar_url":"https://avatars.githubusercontent.com/u/2993338?v=3","gravatar_id":"","url":"https://api.github.com/users/ljchang","html_url":"https://github.com/ljchang","followers_url":"https://api.github.com/users/ljchang/followers","following_url":"https://api.github.com/users/ljchang/following{/other_user}","gists_url":"https://api.github.com/users/ljchang/gists{/gist_id}","starred_url":"https://api.github.com/users/ljchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljchang/subscriptions","organizations_url":"https://api.github.com/users/ljchang/orgs","repos_url":"https://api.github.com/users/ljchang/repos","events_url":"https://api.github.com/users/ljchang/events{/privacy}","received_events_url":"https://api.github.com/users/ljchang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-13T00:09:51Z","updated_at":"2016-02-16T14:08:00Z","closed_at":null,"body":"We have recently observed a memory leak using DrawFormattedText() in a while loop (though other drawing functions might demonstrate same issue).  It seems to be worse when the text size is bigger.  \r\n\r\nMatlab Version:  8.5.0.197613 (R2015a)\r\nPTB Version: 3.0.12 - Flavor: beta - Corresponds to SVN Revision 7386\r\nMacOS Version: 10.10.5\r\nHardware: MBP Retina 15-inch, Mid 2015\r\n\r\nWe haven't observed this behavior using older versions of Matlab (e.g., 8.0.0.783 (R2012b) on a mid-2012 MBA, OS 10.8.4.\r\n\r\nSee our example function for replicating issue.\r\n```\r\nfunction MemoryLeakExample()\r\n\r\nScreen('Preference', 'SkipSyncTests', 1)\r\nscreens = Screen('Screens');\r\nscreenNumber = max(screens);\r\n\r\n[window, rect] = Screen('OpenWindow', screenNumber, [0 0 0 ]);\r\nScreen('TextSize', window, 100);\r\nbuttons=0;\r\n\r\nwhile ~buttons\r\n    DrawFormattedText(window,'Watch memory usage grow!','center','center', [255 255 255]);\r\n    Screen('Flip',window);\r\nend\r\n\r\nsca;\r\n\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/Psychtoolbox-3/Psychtoolbox-3/issues/comments/184695024","html_url":"https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/315#issuecomment-184695024","issue_url":"https://api.github.com/repos/Psychtoolbox-3/Psychtoolbox-3/issues/315","id":184695024,"user":{"login":"ljchang","id":2993338,"avatar_url":"https://avatars.githubusercontent.com/u/2993338?v=3","gravatar_id":"","url":"https://api.github.com/users/ljchang","html_url":"https://github.com/ljchang","followers_url":"https://api.github.com/users/ljchang/followers","following_url":"https://api.github.com/users/ljchang/following{/other_user}","gists_url":"https://api.github.com/users/ljchang/gists{/gist_id}","starred_url":"https://api.github.com/users/ljchang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljchang/subscriptions","organizations_url":"https://api.github.com/users/ljchang/orgs","repos_url":"https://api.github.com/users/ljchang/repos","events_url":"https://api.github.com/users/ljchang/events{/privacy}","received_events_url":"https://api.github.com/users/ljchang/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T14:08:00Z","updated_at":"2016-02-16T14:08:00Z","body":"Yikes, this is pretty unbelievable.  Thanks @kleinerm and @dcnieho for your suggestions!  We'll report back soon."}}