在Delphi-2010中还需要FastShareMem吗? [英] FastShareMem still necessary in Delphi-2010?

查看:81
本文介绍了在Delphi-2010中还需要FastShareMem吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我正在使用Delphi 7进行开发.我的DLL的TStringLists我使用 FastShareMem 单元作为我开发的每个程序和dll中的第一个单元.

Up until now I am developing using Delphi 7. In order to pass f.e. TStringLists to my DLL's I use the FastShareMem unit as first unit in every program and dll I develop.

如果我应该迁移到Delphi-2010,是否还需要FastShareMem?

If I should migrate to Delphi-2010, Does FastShareMem still necessary ?

感谢您提供的任何见解.

Thanks for any insight you may provide.

推荐答案

简短答案:不,SimpleShareMem随Delphi 2010一起提供

Short answer: No, SimpleShareMem comes with Delphi 2010

长答案:是的,Delphi仍然具有其自己的内存管理器,并且一个内存管理器(exe)声明的内存无法返回到另一个内存管理器(dll).但是自从Delphi 2006以来,Delphi附带了一个名为 FastMM 的新内存管理器,它可以与FastShareMem和也不需要分发任何额外的dll.您需要使用一个名为SimpleShareMem的单元. FastMM还具有其他不错的功能,您可能想签出. FastMM也可用于Delphi 7 BTW.

Long answer: Yes, Delphi still has its own memory manager and memory claimed from one memory manager (exe) can not be returned to another (dll). But since Delphi 2006 Delphi comes with a new memory manager called FastMM which can do the same as FastShareMem and also does not require any extra dlls to be distributed. You need to use a unit called SimpleShareMem. FastMM also has other nice features you might want to check out. FastMM is also available for Delphi 7 BTW.

如果使用运行时程序包进行编译,则无需使用任何技巧,因为这样便可以共享内存管理器.它还具有共享相同类型的优点.不能再将TFont分配给TFont问题.当然,这确实意味着您必须分发运行时程序包.

You don't need to use any of those tricks if you compile with runtime packages, since the memory manager is then shared. It also comes with the advantage of sharing the same types. No more TFont can not be assigned to TFont problems. Of course this does mean you have to distribute the runtime packages.

这篇关于在Delphi-2010中还需要FastShareMem吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆