Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_mem
#2
It depends somewhat what you're asking:

1. If you mean that program in it's entirety, then yes it's fine because you're not required to free anything before your program ends, the OS will do it if you don't.

2. If you mean using that as part of a larger program, then the requirement right now is that you `_MemFree` any `_Mem` that you receive, so `_Mem(variable)`, `_Mem(offset, length)`, `_MemImage(image)`, etc. all require calling `_MemFree`. Not doing so risks a memory leak related to the information used to track the `_Mem`s.

In practice `_Mem(variable)` does not actually require a `_MemFree` call, but it may not remain that way in the future so you should free them anyway.
Reply


Messages In This Thread
_mem - by Jack - 12-31-2024, 09:52 PM
RE: _mem - by DSMan195276 - 01-01-2025, 07:11 AM
RE: _mem - by Jack - 01-01-2025, 09:08 AM
RE: _mem - by Jack - 01-01-2025, 10:01 AM
RE: _mem - by SMcNeill - 01-01-2025, 10:18 AM
RE: _mem - by SMcNeill - 01-01-2025, 10:10 AM
RE: _mem - by Jack - 01-01-2025, 10:27 AM
RE: _mem - by SMcNeill - 01-01-2025, 10:36 AM
RE: _mem - by Jack - 01-01-2025, 10:40 AM
RE: _mem - by SMcNeill - 01-01-2025, 10:45 AM
RE: _mem - by Kernelpanic - 01-01-2025, 11:55 PM
RE: _mem - by DSMan195276 - 01-01-2025, 11:13 PM
RE: _mem - by DSMan195276 - 01-02-2025, 12:27 AM



Users browsing this thread: 6 Guest(s)