iOS Question Show available memory in b4i?

Vern

Member
Licensed User
Longtime User
Is there a way in b4i to show available memory? I want to compare memory usage for each page to detect memory leaks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Do you get an error? If not then don't waste too much time on this.

 
Upvote 0

Vern

Member
Licensed User
Longtime User
Users are having to restart their phones every 2 days to clear memory so yes, there's an issue. Is there any way to display available memory so we can detect where there are memory leaks?
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
os_proc_available_memory in os framework (ios 13+). But results maybe not the same, as you expect.

Example.
B4X:
    Dim noMe As NativeObject = Me   
    Log (noMe.RunMethod ("getAvailableMemory", Null).AsNumber)

OBJC:

B4X:
#If OBJC
#import <os/proc.h>
- (size_t) getAvailableMemory { return os_proc_available_memory; }
#End If
 
Last edited:
Upvote 0

Vern

Member
Licensed User
Longtime User
Apple directed us to these docs:


We were looking for a way in b4i to track down the issue.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…