It is possible that this object was over-released, or is in the process of deallocation解决办法

使用wekwebview时,push后,再pop返回,报错了:

Cannot form weak reference to instance (xxxx) of class xxxx. It is possible that this object was over-released, or is in the process of deallocation.

解决方案:

1. 不要在 dealloc 方法中,使用 weak self

2. A控制器(包含scrollView及其子类,并设置了其代理),B控制器(webView,并设置了webView.scrollView.delegate = self),当A push 到 B,然后B pop回 A时,会引起程序崩溃。解决方案就是再B将要退出时把webView.scrollView.delegate = nil

我用第二种办法解决了,在deinit添加如下

deinit{
    wkWebView.scrollView.delegate = nil

}

如果是oc,就在deallco里写,一样的。

时间: 2024-12-17 11:28:26

It is possible that this object was over-released, or is in the process of deallocation解决办法的相关文章

The method assertEquals(Object, Object) is ambiguous for the type Assert解决办法

该错误意思是方法调用存在歧义,先看下面这个例子: assertEquals(10L, (Long)10); 编译器就会报出The method assertEquals(Object, Object) is ambiguous for the type Assert的错误: 10L是long型,而(Long)10是Long型.而assertEquals()是一个重载的方法,其中就有 assertEquals(Object,Object) assertEquals(Long, Long) 那么问题

org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session异常解决办法

org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session异常解决办法 为什么还会说已经存在相同的session了呢.然后每次将项目重启后第一次编辑的时候问题不会触发,只有当第二次操作的时候才会出现这个问题. 解决办法:关闭session.好好检查操作完成后有没有关闭会话. org.hibernat

关于ORA-04021解决办法(timeout occurred while waiting to lock object)

某个应用正在锁定该表或者包 表为 select b.SID,b.SERIAL#,c.SQL_TEXT from v$locked_object a, v$session b, v$sqlarea c where a.SESSION_ID = b.SID and b.SQL_ADDRESS = c.ADDRESS and c.sql_text like '%table_name%' 包为 select B.SID,b.USERNAME,b.MACHINE FROM V$ACCESS A, V$SE

php json 解析有stdClass Object 解决办法

php json 解析有stdClass Object mixed json_decode ( string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0 ]]] ) json 待解码的 json string 格式的字符串. This function only works with UTF-8 encoded data. assoc 当该参数为 TRUE 时,将返回 array 而非 object .

ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解决办法

>>> import MySQLdbTraceback (most recent call last):  File "<stdin>", line 1, in <module>  File "build/bdist.linux-x86_64/egg/MySQLdb/__init__.py", line 19, in <module>  File "build/bdist.linux-x86_64/eg

关于/usr/local/lib/libz.a(zutil.o): relocation R_X86_64_32 against `.rodata.str1.1&#39; can not be used when making a shared object; recompile with -fPIC解决办法

具体报错截图如下: 解决方法: 题外话,我对makefill cmake也是一窍不通因此本人也是不想去积极的解决这个问题,但是当你求助无缘的时候你才会静心去思考.读到这句话的时候也许你已经发现了问题所在了 问题所在: zlib设置问题 解决方案: 1.最好重新安装zlib 2.打开配置文件 3.修改配置文件 SFLAGS=${CFLAGS-"-O3 -fPIC"} 完成. 关于/usr/local/lib/libz.a(zutil.o): relocation R_X86_64_32

启动tomcat报错 Could not reserve enough space for object heap的解决办法

问题:打开eclips启动tomcat发现报出Could not reserve enough space for object heap错误. 解决办法:1.首先检查tomcat是否能正常启动.remove掉tomcat里所有的项目启动.如果仍然有错就说明是tomcat有问题.删除tomcat 重新部署一个,即可解决.    2.如果启动tomcat没错,项目添加后有问题,就是jvm 溢出  内存不够.就要进行修改jvm内存启动即可.

Could not reserve enough space for object heap解决办法

Centos6.4  Jdk1.6 1.在终端输入Java命令报错 [[email protected] local]# java Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Progr

TRACE nova AttributeError: &#39;module&#39; object has no attribute &#39;packs&#39; 解决办法

I got the following errors when I was deploying OpenStack with devstack. 2013-02-28 01:08:28 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.migration' from '/opt/stack /nova/nova/db/sqlalchemy/migration.pyc'> from (pid=27011) __get_backend