IOS10 Swift3 with UIWebView/WKWebView

hello guys,please help me.This really rush.thanks

I used

{

try data.write(to: URL(fileURLWithPath: fullpath), options: NSData.WritingOptions.atomicWrite)

let urlStr = URL(fileURLWithPath: fullpath)

webView.load(URLRequest(url:urlStr))

}

or

{

webView.load(data, mimeType: "application/pdf", characterEncodingName: "utf-8", baseURL: NSURL() as URL)

}

to read local pdf file , but when I change the file, the memory didn't release, end up the app crash


webView.stopLoading()

webView.delegate = nil

URLCache.shared.removeAllCachedResponses()

URLCache.shared.diskCapacity = 0

URLCache.shared.memoryCapacity = 0

those are not helpful

and ios 9 is normal , it happens to ios 10

IOS10 Swift3 with UIWebView/WKWebView
 
 
Q