mirror of
https://github.com/darlinghq/darling-libobjc2.git
synced 2025-01-16 22:18:16 +00:00
13 lines
283 B
C
13 lines
283 B
C
#include <dlfcn.h>
|
|
|
|
/**
|
|
* Check if an object is in one of the sections that the loader allocated. If
|
|
* so, it won't have a GCKit header so we just assume that it never needs
|
|
* collecting.
|
|
*/
|
|
static inline BOOL GCObjectIsDynamic(id obj)
|
|
{
|
|
Dl_info i;
|
|
return !dladdr(obj, &i);
|
|
}
|