共享内存或引用内存对象用于 UWP 多实例应用程序?

huangapple go评论70阅读模式
英文:

Shared memory or reference to memory objects for UWP multi instance app?

问题

有没有办法在多个 UWP 应用程序实例之间创建共享内存?

例如,我需要在一个 UWP 应用程序实例中加载数百张图像(作为位图)。在其他实例中加载相同的图像可能会占用双倍的内存。

有没有办法让多个 UWP 应用程序实例使用相同的内存引用?或者有没有办法减少这种多余的内存使用?

尝试了共享内存,但似乎不支持 UWP。

目前正在分开加载,这会使内存使用量增加。

此外,在这种情况下,共享数据是否有助于解决问题?

英文:

Is there any way to create shared memory between multiple instance of an UWP app?

For example, I need to load hundreds of images (as Bitmap) in one instance of UWP app.
Loading same images in the other instance can take double memory.

Is there any way that multiple instances of the UWP app will be using same memory reference? Or there is there any way to reduce this redundant memory usage?

Tried shared memory. But looks like no support for UWP.

Currently loading separately which is multiplying the memory usage.

Also, does shared data come in help in this case?

答案1

得分: 0

在UWP中,没有可用于共享内存的API。当从不同的UWP应用程序实例中读取文件时,它们将创建自己的内存使用。

英文:

I have to say that there is no API in UWP that could be used to share memory as you want. When reading from the file from different instance of UWP apps, it will create their own memory usage.

huangapple
  • 本文由 发表于 2023年1月9日 16:04:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/75054521.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定