|本期目录/Table of Contents|

[1]刘黎志,刘君.空气质量实时监测系统的内存泄漏[J].武汉工程大学学报,2012,(06):74-78.[doi:103969/jissn16742869201206019]
 LIU Li\|zhi,LIU Jun.Memory leak in air quality real-time monitoring system[J].Journal of Wuhan Institute of Technology,2012,(06):74-78.[doi:103969/jissn16742869201206019]
点击复制

空气质量实时监测系统的内存泄漏(/HTML)
分享到:

《武汉工程大学学报》[ISSN:1674-2869/CN:42-1779/TQ]

卷:
期数:
2012年06期
页码:
74-78
栏目:
机电与信息工程
出版日期:
2012-06-30

文章信息/Info

Title:
Memory leak in air quality real-time monitoring system
文章编号:
16742869(2012)06007405
作者:
刘黎志12刘君2
1.武汉工程大学智能机器人湖北省重点实验室, 湖北 武汉430074;
2.武汉工程大学计算机科学与工程学院,湖北 武汉430074
Author(s):
LIU Li\|zhi12LIU Jun2
Hubei Province Key Laboratory of Intelligent Robot, Wuhan Institute of Technology,Wuhan 430074,China;
School of Computer Science and Engineering ,Wuhan Institute of Technology ,Wuhan 430074,China
关键词:
内存泄漏谷歌地图异步脚本及标记语言实时监测
Keywords:
memory leak goggle map asynchronous javascript and XML real-time monitoring
分类号:
TP311
DOI:
103969/jissn16742869201206019
文献标志码:
A
摘要:
空气质量实时监测系统要求每5 min从数据库中取出监测数据,并将数据动态显示在Google地图标记的信息窗口中.直接使用封装谷歌地图的控件及在脚本中定义局部谷歌地图实例对象,都会发生内存泄漏,原因是脚本语言没有提供回收对象实例的方法,所有局部对象实例的回收都由系统内置的垃圾回收机制自动完成.而垃圾回收机制何时运行,完全由操作系统决定,程序无法控制.提出将地图对象及相关的标记、信息窗体对象全局化定义,使得相关对象只定义及实例化一次,避免实例对象的重复定义,解决了系统内存的泄漏问题.
Abstract:
Air quality monitoring system gets data from database every 5 minutes and displays data in the information window of Google map marker dynamically. A memory leak occurs directly using map controls and defining local Google map object instances in Javascript,because Javascript doesn’t provide the method to recycle object instances. All local object instances are recycled by garbage collection mechanism within operation system. But when and how the garbage collection mechanism to run is decided entirely by operation system,programmer can’t control. We propose that map objects and tags,information windows are defined only once as global object to avoid duplicate definition of instance objects,so as to solve the memory leak problems.

参考文献/References:

[1]Velio Ivanov. Google Map Control for ASP.NET [EB/OL]. http://googlemap.codeplex.com.2011-02-16.
[2]黄瑶.C/C++程序内存泄漏检测和分析技术的研究与实现[D].北京:北京航空航天大学软件学院.2004.
[3]胡燕,龚育昌. 一种混合式内存泄漏静态检测方法. 小型微型计算机系统[J]. 2008,29(10): 1935-1939.
[4]Google Code. Google Maps JavaScript API V3 [EB/OL]. http://code.google.com/intl/zh-CN/zh-CN/apis/maps/documentation/javascript/.2010-06-15.
[5]Regehr J,Cooprider N,Archer W.Efficient type and memory safety for tiny embedded systems [C]//In Proceedings of the PLOS 2006 Workshop on Linguistic Support for Modern Operating Systems.California:San Jose,2006:64-68.

相似文献/References:

备注/Memo

备注/Memo:
收稿日期:20110926基金项目:武汉工程大学智能机器人湖北省重点实验室开放基金(HBIR201006)作者简介:刘黎志(1973-),男,湖北武汉人,副教授,硕士.研究方向:基于网络的计算机应用、商业智能、数据仓库及数据挖掘.
更新日期/Last Update: