我应该释放我复制到剪贴板的内存吗? [英] should i free the memory i copied to clipboard?

查看:57
本文介绍了我应该释放我复制到剪贴板的内存吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将 win32 程序中的数据复制到剪贴板时,我是否应该在将其粘贴到其他位置后释放我复制到剪贴板的内存?或者系统对此负责.

When I copy data in my win32 program to the clipbord, should i free the memory i copied to clipboard, after I paste it elsewhere? or the system is responsible for this.

推荐答案

一般由系统来完成,但是一些负责任的应用程序也会照顾到要求用户在离开前释放剪贴板.

It is generally done by the system however, some responsible applications also take care of asking the user to free up the clipboard before leaving.

例如MSWord 在退出前会询问用户是否将数据保存在内存中.对于一般用途,您可以将其留给系统.

e.g. MSWord will ask the user to keep the data in memory or not before it quits. For general purpose, you can leave it to system.

请记住,用户可能希望将其保存在剪贴板中(即使在关闭应用程序之后),因此您不应该破坏它并将其从内存中删除.

Remember here that user might want to keep it in Clipboard (Even after closing application) so you should not mangle with it and remove it from memory.

这篇关于我应该释放我复制到剪贴板的内存吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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