范维肖ID:fanweixiao
4940次访问,排名17830(-2)好友44人,关注者84
if(a=b)a=/*b(c语言)
fanweixiao的文章
原创 10 篇
翻译 2 篇
转载 1 篇
评论 20 篇
范维肖的公告
最近评论
thunder43:V8没啥兴趣,这个GVN你用过么?好用么?
chuanyuewen:学习拉
chuanyuewen:学习拉
fanweixiao:是gc小组的一个leader写过的,我又加了一些东西.
fanweixiao:是gc小组的一个leader写过的,我又加了一些东西.
文章分类
收藏
    相册
    存档
    软件项目交易
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 不知道多少人存在这个误解:收藏

    新一篇: Internal .Net Framework Data Provider error 6 | 旧一篇: Internal .Net Framework Data Provider error 6

     
    1. When the script engine is shut down, garbage is collected.
    2. When 256 variants, or more than 64KB of strings, or more than 4096 array slots have been allocated, the garbage collector sets a flag that says collect soon.
    3. Whenever a new statement is executed or the script debugger starts, that flag is checked, and if it is set, a collection is done.

    看到这篇帖子的朋友不知道有多少人看过上面三条规则,如果你从搜索引擎搜索javascript delete object的话会经常看到上面这三条,但是这3条规则其实是针对Jscript的,跟javascript没有关系的

    全文:

    JScript uses a mark-and-sweep garbage collector with a variety of heuristics used to determine when to run garbage collection. The JScript garbage collector works like this:

    There is an undocumented JScript function called CollectGarbage that forces a garbage collection. This is for testing purposes only—do not ship code that calls this function. It is a poor programming practice to write code in JScript that depends on garbage collections being done at particular times. If you need predictable garbage collection, use a language that supports it (like Visual Basic® or VBScript). Note that all of this is the implementation detail of the engine and should not be relied upon because it may change in the future. Note also that the version of JScript supported by Microsoft® .NET will use the .NET Framework garbage collector, a multigenerational mark-and-sweep collector.
    And remember, if you want a deterministic-lifetime app, use a deterministic-lifetime language like C++, Visual Basic 6.0, or VBScript; not an indeterministic-lifetime language like JScript, Scheme, or Java. If you're writing a program that depends on being able to have a deterministic object lifetime, JScript is not the right tool for the job. Trying to make it a deterministic-lifetime language will just create headaches down the road.

     

    发表于 @ 2008年01月14日 13:28:00|评论(loading...)|编辑

    新一篇: Internal .Net Framework Data Provider error 6 | 旧一篇: Internal .Net Framework Data Provider error 6

    评论:没有评论。

    发表评论  


    登录
    Csdn Blog version 3.1a
    Copyright © 范维肖