Memory Mapped Files -- does the file survive as long as ANY process using it is active?

asked 2021-11-16T14:33:45.98+00:00
Robert Gustafson 601 Reputation points

WHAT I HAVE:
Visual Basic 2019, WinForms, .NET 4.6+

MY ISSUE:
I'm trying to use memory-mapped files to share data between different instances (of undetermined number) of my app. What I need to know is this: Does the file die when the current instance/process terminates or disposes of it, or does it survive until all instances/processes using it have terminated or disposed of it? The point is, I can't count on my instances finishing in any given order relative to the order in which they were started, and I need to access the same MMF data so long as any instance is running.

Please give me an answer ASAP, and, as for any code samples, keep it simple and in VB.NET.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,314 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,822 questions
{count} votes