<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>stanleyxu 的秘密基地 - </title><link>category/42806.aspx</link><description /><dc:language>zh-CN</dc:language><lastUpdateTime>Sun, 27 Apr 2008 15:25:00 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>stanleyxu</dc:creator><title>Unicode 随想</title><link>http://blog.csdn.net/Stanley_Xu/archive/2008/01/11/2035925.aspx</link><pubDate>Fri, 11 Jan 2008 06:48:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2008/01/11/2035925.aspx</guid><wfw:comment>comments/2035925.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2008/01/11/2035925.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/2035925.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2035925</trackback:ping><description>最近 CodeGear 的工程师开始谈论[1][2][3][4][5] Delphi 全面支持 Unicode 的问题了。尽管这个是十年前的新闻，但对于 Delphi 的粉丝来说，迟到总比不到要强。本文是我对目前 Unicode 封装计划的一些看法。&lt;img src ="aggbug/2035925.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>stanleyxu</dc:creator><title>查询接口小议</title><link>http://blog.csdn.net/Stanley_Xu/archive/2007/08/02/1722313.aspx</link><pubDate>Thu, 02 Aug 2007 11:59:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2007/08/02/1722313.aspx</guid><wfw:comment>comments/1722313.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2007/08/02/1722313.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>comments/commentRss/1722313.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1722313</trackback:ping><description>这篇文章除了要介绍一下接口的查询方法外，主要是要想交代一下我在具体使用接口中发现的一些问题。
(1) TInterfacedObject 由于会在 FRefCount=0 时释放掉对象实例，所以在使用上要格外小心。建议重新封装一个TInterfacedObjectEx，或者改用 TComponent。
(2) Supports 内部这行代码虽不知其用意，但显然是不安全的！尤其是在使用委托机制实现接口封装的时候。说明：我暂时无法证明去掉有问题的这行是否能保证不引入其它问题。&lt;img src ="aggbug/1722313.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>stanleyxu</dc:creator><title>可能你不知道的内存泄漏</title><link>http://blog.csdn.net/Stanley_Xu/archive/2007/07/20/1699834.aspx</link><pubDate>Fri, 20 Jul 2007 02:53:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2007/07/20/1699834.aspx</guid><wfw:comment>comments/1699834.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2007/07/20/1699834.aspx#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>comments/commentRss/1699834.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1699834</trackback:ping><description>为了提高 string 的读写性能 Delphi 采用了 Copy-on-Write 机制进行内存管理。简单来说，在复制一个 string 时并不是真的在内存中把原来 string 的内容复制一份到另外一个地址，而是把新的 string 在内存映射表中指向同原 string 相同的位置，并且把那块内存的引用计数加一。这样就省去了复制字符串的时间。只有当 string 的内容发生变化的时候，才真正将改动的内容完整复制一份到新的地址，然后对原地址的引用计数减一，将新地址的引用计数设为一，最后将新 string 在内存映射表中指向这个新的位置。当某个字符串内存块的引用计数为零了，这块内存就可以被其它程序使用了。注意：所有常量 string 会在编译时率先分配内存，其引用计数不会在程序中变化，始终为-1。&lt;img src ="aggbug/1699834.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Stanley_Xu</dc:creator><title>你的单例足够单吗</title><link>http://blog.csdn.net/Stanley_Xu/archive/2007/05/11/1604060.aspx</link><pubDate>Fri, 11 May 2007 09:41:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2007/05/11/1604060.aspx</guid><wfw:comment>comments/1604060.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2007/05/11/1604060.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/1604060.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1604060</trackback:ping><description>假设 A 率先调用函数 Clipboard，局部变量 FClipboard会先进行实例化。在实例尚未完全创建完之前，如果 B 也尝试调用函数Clipboard，那么它也会去对 FClipboard 进行实例化。因为变量FClipboard此时依然为空指针。于是乎A、B分别创建了一个 TClipboard 的实例，其中的一个变成了一个内存泄漏。这种泄漏往往发送在构建函数需要耗费较长时间的情况下。如何将上述代码改成线程安全的呢？其实可以通过加入临界区处理来解决。&lt;img src ="aggbug/1604060.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>stanleyxu</dc:creator><title>如何访问私有成员变量和函数 (修正版)</title><link>http://blog.csdn.net/Stanley_Xu/archive/2007/04/09/1557107.aspx</link><pubDate>Mon, 09 Apr 2007 00:49:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2007/04/09/1557107.aspx</guid><wfw:comment>comments/1557107.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2007/04/09/1557107.aspx#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>comments/commentRss/1557107.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1557107</trackback:ping><description>修改 Delphi 源码或者访问对象的私有成员函数的一些方法&lt;img src ="aggbug/1557107.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>stanleyxu</dc:creator><title>告别畸形的工具提示</title><link>http://blog.csdn.net/Stanley_Xu/archive/2007/02/18/1511572.aspx</link><pubDate>Sun, 18 Feb 2007 08:45:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2007/02/18/1511572.aspx</guid><wfw:comment>comments/1511572.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2007/02/18/1511572.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>comments/commentRss/1511572.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=1511572</trackback:ping><description>工具提示 (Tooltip 或者 Hint) 属于一个典型的畸形封装。或许是 Borland 的工程师想让 Delphi 的应用程序与众不同，而故意将工具提示最外层边框不用标准的黑色。但新的 Windows Vista 系统对工具提示做了调整，……&lt;img src ="aggbug/1511572.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Stanley_Xu</dc:creator><title>用来替换 MaskMatch 的通配符比较函数</title><link>http://blog.csdn.net/Stanley_Xu/archive/2004/09/10/99876.aspx</link><pubDate>Fri, 10 Sep 2004 01:08:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2004/09/10/99876.aspx</guid><wfw:comment>comments/99876.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2004/09/10/99876.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/99876.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=99876</trackback:ping><description>Delphi 提供的通配符匹配函数 TMask.Matches 有些问题：如果通配符字符串太长，比如进入 hotmail 邮箱时的地址有大概250个字符。这会导致 TMask.Matches 函数出错，并导致整个程序崩溃。我在网上找了一些不同的实现，并且做了性能比较。现在我优化过的版本分享出来。&lt;img src ="aggbug/99876.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>stanleyxu</dc:creator><title>可能你不知道的 CPU 资源杀手</title><link>http://blog.csdn.net/Stanley_Xu/archive/2004/09/10/99874.aspx</link><pubDate>Fri, 10 Sep 2004 01:01:00 GMT</pubDate><guid>http://blog.csdn.net/Stanley_Xu/archive/2004/09/10/99874.aspx</guid><wfw:comment>comments/99874.aspx</wfw:comment><comments>http://blog.csdn.net/Stanley_Xu/archive/2004/09/10/99874.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>comments/commentRss/99874.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=99874</trackback:ping><description>如果你没有用过 TAction，或许你不该说你会 Delphi。TAction 大大简化了界面逻辑的关联，加速了项目的开发。不过我在程序中大量使用 TAction 时，无意发现这样一个问题：如果程序的某个窗体里有超过100个 TAction，在运行这个程序时，只要不停的在该窗体上快速移动鼠标，CPU 占用率会猛增到 30% 左右。[...]&lt;img src ="aggbug/99874.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>