<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<br class=""><br class="">I watched the WWDC 2013 session on integrating JavaScript into native apps and so I implemented a JavaScript library for a Swift iOS app connecting via JavaScriptCore. Although I don’t really know if this mail list is the correct place to ask, I thought I’d give it a shot.<br class="">I really liked how easy it was to get Swift to work with JavaScript and vice versa. But I stumbled upon a problem when I was testing the performance of my app. I wrote a XCTest in Xcode which performs multiple calls of the JavaScript library (with loops) but it always stops or freezes after the 292nd call.<br class="">I guess that the JavaScriptCore context (or virtual machine) are not deinitialized after the method call was successful. I even tried a manual deinitialize but it still freezes. I looked up the allocations in Instruments and it shows multiple VM: JS garbage collector allocations which are still active in the app.<br class="">I wrote a question on StackOverflow with some code examples and the Instruments log:<br class=""><a href="http://stackoverflow.com/questions/30443993/javascriptcore-on-ios-vm-garbage-collector-not-automatically-emtpying" class="">http://stackoverflow.com/questions/30443993/javascriptcore-on-ios-vm-garbage-collector-not-automatically-emtpying</a><br class="">but I haven’t received a single answer yet. I guess JavaScriptCore on iOS is still something that is not being used very much.<br class=""><br class="">I would be very happy if someone could take a look into my problem and share thoughts on it. This is part of my bachelor thesis so it would really help me a lot.<br class=""><br class="">Thank you in advance and best regards,<br class="">Max Hentschel</body></html>