list_to_atom和list_to_existing_atom的区别
来源:互联网 发布:淘宝素材店铺招牌120 编辑:程序博客网 时间:2024/06/05 22:30
Erlang atom不参与垃圾回收,一旦创建就不会被移除掉;一旦超出atom的数量限制(默认是1048576) VM就会终止掉.对于一个会持续运行很久的系统,把任意字符串转成atom是很危险的,内存会慢慢被吃光.如果使用的原子是在预期范围内的,比如协议模块的名称,那么可以使用list_to_existing_atom来进行防范,这个方法所产出的atom必须是之前已经创建过的.
例如: 1>list_to_existing_atom("2").
会报 ** exception error: bad argument
in function list_to_existing_atom/1
called as list_to_existing_atom("2")
2>list_to_atom("2").
3>'2'
4>list_to_existing_atom("2").
5>'2'
0 0
- list_to_atom和list_to_existing_atom的区别
- list_to_atom与list_to_existing_atom区别
- 和和的区别
- & 和 &&、|和||的区别:
- &和&&、|和||的区别
- &&和&,||和|的区别
- &和&&、|和||的区别
- &和&&、|和||的区别
- ../和./和/的区别
- &和&&,|和||的区别
- "&"和"&&"、"|"和"||"的区别
- &和&& |和||的区别
- &和&&的区别 |和||的区别
- &&和&的区别,||和|的区别
- &和&&的区别以及|和||的区别
- &&和&的区别? | | 和|的区别?
- &和&&的区别,|和||的区别
- &和&&的区别及!和~区别
- The web.config file for this project is missing the required DirectRequestModule.
- Oracle Virtualbox视图切换
- c语言中static 用法总结
- 网页常用的Jquery/Js 脚本
- 在 Java 中应用设计模式 - Factory Method .
- list_to_atom和list_to_existing_atom的区别
- ln 命令
- lua(2) table排序
- 黑马程序员_银行业务调度系统
- SQL2000数据库查询讲解008--查询满足条件的元组05:多重条件查询
- 基础算法(2):快速排序(随机划分+三数取中划分+ 随机三数取中划分+尾递归)
- 高仿Android QQ2012登陆界面和注册界面
- zend studio中ctrl+鼠标左键无法转到类或函数定义文件
- jQuery对select操作小结