{"action":"opened","issue":{"url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/154","labels_url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/154/comments","events_url":"https://api.github.com/repos/gali8/Tesseract-OCR-iOS/issues/154/events","html_url":"https://github.com/gali8/Tesseract-OCR-iOS/issues/154","id":62705806,"number":154,"title":"growing memory usage and then a crash.","user":{"login":"evermeer","id":130834,"avatar_url":"https://avatars.githubusercontent.com/u/130834?v=3","gravatar_id":"","url":"https://api.github.com/users/evermeer","html_url":"https://github.com/evermeer","followers_url":"https://api.github.com/users/evermeer/followers","following_url":"https://api.github.com/users/evermeer/following{/other_user}","gists_url":"https://api.github.com/users/evermeer/gists{/gist_id}","starred_url":"https://api.github.com/users/evermeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evermeer/subscriptions","organizations_url":"https://api.github.com/users/evermeer/orgs","repos_url":"https://api.github.com/users/evermeer/repos","events_url":"https://api.github.com/users/evermeer/events{/privacy}","received_events_url":"https://api.github.com/users/evermeer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-18T14:21:46Z","updated_at":"2015-03-18T14:21:46Z","closed_at":null,"body":"I execute the code below every 2 seconds using a timer. Which each iteration the memory usage grows. Within 2 minutes my app will crash. When i remove the line :'tesseract.image = image' the memory does not grow. Initially I had this code without the autoreleasepool, setting tesseract to nil and clearCache. I also tried initiating the G8Tesseract object only once. None of those did help. \r\n\r\n            autoreleasepool {\r\n                var tesseract:G8Tesseract! = G8Tesseract(language: \"ocr\")\r\n                tesseract.setVariableValue(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<\", forKey: \"tessedit_char_whitelist\");\r\n                tesseract.setVariableValue(\"FALSE\", forKey: \"x_ht_quality_check\")\r\n                tesseract.image = image\r\n                tesseract.recognize()\r\n                result = tesseract.recognizedText\r\n                tesseract = nil\r\n                G8Tesseract.clearCache()\r\n            }\r\n"}}