为什么我的C#窗口应用程序显示* 32位正在进行中 [英] Why my C# window application showing *32 bit in process

查看:59
本文介绍了为什么我的C#窗口应用程序显示* 32位正在进行中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要帮助以64位运行我的应用程序,

i将所有项目平台设置为64位,当我安装我的设置时,它安装在


I need help to run my application as 64 bit,
i set all project platform as 64 bit, when i am installing my setup it is installed in

C:\Program Files



但是当我要运行我的exe时,它会在任务管理器中显示* 32位进程。



我改变了它,因为在32位我遇到了异常内存问题。

任何人都可以帮我这个。



我尝试了什么:



我试图将我的应用程序运行为64但仍然显示* 32正在进行中然后再次出现异常内存


but when i am going to run my exe then it is showing *32 bit in process in task manager.

I changed it because in 32 bit i was having an issue of out of exception memory.
can anyone help me for this.

What I have tried:

I tried to run my application as 64 bit but still it is showing *32 in process and then again out of exception memory comes

推荐答案

如果任务管理器显示我的应用程序(32位)然后你的应用程序在32位模式下运行:可能你没有为版本和调试版本构建64位版本,并且正在运行旧版本。



但是从32位切换到64位EXE可能无法治愈内存不足异常 - 它扩展了指针和引用的大小,但不使用更少的内存(恰恰相反,它增加了每个类实例引用所需的空间:32位模式下的引用数组需要每个实例4个字节相比之下,64位模式下每个都有8个 - 这意味着1024个引用的数组在32位模式下需要4Kb,在64位模式下需要8Kb。



开始于看看你的应用程序以及它正在做什么:它不是仅仅内存分配导致内存不足错误:你可以通过不处理稀有资源(如图形上下文,字体,画笔,句柄等图形项目)来更容易地实现它依此类推,或数据库连接,命令和适配器,或......你可能正在使用大量稀缺资源,这可能会在你用完实际内存之前造成这种情况。规则是:如果它实现了IDisposable,则您负责处理完成后创建的内容。如果不这样做,则会出现内存不足错误。
If the Task Manager is showing "my application (32 bit)" then you application is running in 32 bit mode: probably you haven't built the 64 bit version for both release and debug versions, and are running the older version.

But switching from 32 bit to 64 bit EXE probably won't cure an "out of memory" exception - it expands the size of pointers and references, but doesn't use less memory (quite the contrary, it increases the space each class instance reference needs: an array of references in 32bit mode needs 4 bytes per instance compared with 8 for each in 64 bit mode - which means that an array of 1024 references needs 4Kb in 32 bit mode and 8Kb in 64 bit mode).

Start by looking at your app and what it's doing: it's not "just" memory allocations that cause an out of memory error: you can get it much easier by not disposing of scarce resources such as graphics items like Graphics contexts, Fonts, Brushes, Handles, and so forth, or database Connections, Commands, and adapters, or .... there are loads of scarce resources you could be using and that could cause this well before you run out of actual memory. The rule is: If it implements IDisposable, you are responsible to Disposing of what you created when you are finished with it. If you don't, you will get "out of memory" errors.


这篇关于为什么我的C#窗口应用程序显示* 32位正在进行中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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