Created
November 22, 2018 04:15
-
-
Save michaeleisel/fbf83bcea35c5f974fa579022e2a9b62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static dispatch_source_t msp; | |
static void func() { | |
msp = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYPRESSURE, NULL, DISPATCH_MEMORYPRESSURE_CRITICAL, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)); | |
dispatch_source_set_event_handler(msp, ^{ | |
unsigned long l = dispatch_source_get_data(msp); | |
NSLog@"%@", @(l)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment