关于全局对象的解构函数,代码大概是这样写的:
resource = wl_resource_create(client, &wl_output_interface, version, id);
if (!resource) {
wl_client_post_no_memory(client);
return;
}
wl_resource_set_implementation(resource, &wl_output_impl, 0, wl_resource_destroy_func);
所以原文中描述的
This function is also passed into wl_resource_create as the destructor
应当为 wl_resource_set_implementation
不知道理解对不对💫
关于全局对象的解构函数,代码大概是这样写的:
所以原文中描述的
应当为
wl_resource_set_implementation不知道理解对不对💫