I refer to Google's ESF project code to handle NOTIFY events, but after my notifyQueue is set to QOS_CLASS_BACKGROUND, the process memory gets larger when a lot of events occur. Is there any way to fix this without affecting performance
The code is as follows:
notifyQueue = dispatch_queue_create("notify",dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT_WITH_AUTORELEASE_POOL,QOS_CLASS_BACKGROUND, 0));
if (msg->action_type == ES_ACTION_TYPE_NOTIFY) {
es_message_t *copied_msg = [self copy_message:msg];
if (!copied_msg) {
return;
}
dispatch_async(self->_notifyQueue, ^{
@autoreleasepool {
[self handle:copied_msg];
[self free_message:copied_msg];
}
});
}