I am facing issue on memory leakage in Chrome.
Steps.
1. I am opening other (BPM) application in iframe from my application.
2. Before opening the iframe application, memory was 8.2 MB. When i opens up iframe memory reaches to 18 MB.
3. When i close the iframe window, memory should release and it should be back to 8.2 but its not happening. Memory is still 18 MB.
I tried many solutions but none is working.
Unloading/Removing content from an iFrame
Can anyone helps me out on this.
Related
This is more of a question and an answer. I had noticed in iOS 9 I had no memory issues using the CGPDF Library, and flipped through x amount of pages with no issues. See the attached screenshot, notice each page swipe the memory went down:
However in iOS 10, the exact same PDF and code had a crashing issue when you swipe a certain amount of pages. The app would crash from memory allocations. See attached screenshot, continuous rise in memory:
I'm posting this as a question of if anyone else has encountered this issue with iOS 10, how I fixed the issue was to CGPDFDocumentRelease in the didReceiveMemory warning and then immediately reload my CGPDFDocument, which let the app continue without crashing on iOS 10. After adding the release in the didReceiveMemory, my instruments looks like this, I have not tested on iOS 11 beta yet:
The fix was to add CGPDFDocumentRelease in the didReceiveMemory warning and then immediately reload my CGPDFDocument
I'm working on a swift app that contains a UIWebView and the site that it shows is kinda big and it has a lot of pictures and javascript, when I test it on a virtual device, it works. but on a real Iphone or Ipad it crashes after a couple of seconds, Xcode shows me the memory usage goes around 50 mb and the cpu usage goes up until 101% and the app crashes.
Is there a way to fix this without editing the website?
I have loaded a pdf in a UIWebView using PDFJS (pdf.js mozilla library).
All loading is fine, but the app crashes, when the user scrolls very fastly and when zoom. Up on debugging, I noticed that App received memory warning and crashed.
Anyone faced this issue, how do we handle the memory warning generated by UIWebview?
Working on a site and got feedback from the client that when browsing the site on an iPad and iPad Mini the site will suddenly reload with the message "A problem occurred with this webpage so it was reloaded".
The site it's happening on is a fairly image heavy one, it's infinite scroll page with about 60 entries, retina enhanced imagery via <picture> element.
Never seen this before, what's causing it, and how can I get around it?
Perhaps it runs out ouf memory? But I thought iOS was smart enough to dump images out of view if it needs memory to load new stuff?
Apparently this did not happen on iPhones (I take it they tried with 5S and 6), but that's probably because the total screen resolution is much lesser and the images are smaller in file size..
The only way to find out is to plug an iPad/iPad Mini into a Mac running Safari and inspect the page runing on the device. So, first, turn on the "Develop" menu (in OS X Safari's Advanced Preferences), like this:
Then from the Develop menu you can select the device you want to inspect Mobile Safari on… like this:
That gives you effectively the same inspector that the desktop version of Safari uses and hopefully you'll find some clues as to what is going wrong. (I'm betting Javascript error).
I have an iPad app which has a UIViewController containing a UIWebView for viewing documents. I've been using this happily for some time with no problems. However I've come across a 13 page PDF document which the UIWebView loads OK but when you scroll through the pages it causes the app to crash, unless there are very few other apps loaded at the time. When running the app in debug mode, I get the message "Received memory warning" in the debug window. When the app crashes I often (but not always) get a EXC_BAD_ACCESS. I have successfully viewed much bigger PDFs than this one in the past, but this one does have more graphics. I have an iPhone app which uses the same UIViewController and this loads and views the PDF fine with no errors. Any ideas how to handle this?