gpt4 book ai didi

ios - 选择不同位置时如何释放GMSPlacePickerViewController占用的内存?

转载 作者:行者123 更新时间:2023-11-30 11:32:57 27 4
gpt4 key购买 nike

我遇到了与 GMSPlacePickerViewController 相关的问题,我尝试使用谷歌提供的 GMSPlacePickerViewController 多次选择位置。经过几次尝试后,我将收到内存警告“网络连接丢失”。警报。 所以任何人都知道如何解决这一问题。

提前致谢。

最佳答案

请在 didReceiveMemoryWarning() 方法中键入此代码

override func didReceiveMemoryWarning() 
{
super.didReceiveMemoryWarning()
URLCache.shared.removeAllCachedResponses()
URLCache.shared.diskCapacity = 0
URLCache.shared.memoryCapacity = 0
self.viewMap.clear()
self.viewMap.reloadInputViews()

}

关于ios - 选择不同位置时如何释放GMSPlacePickerViewController占用的内存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50059982/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com