Skip to content

5.2 注册全局对象 wl_resource_create #10

Description

@qaqland

关于全局对象的解构函数,代码大概是这样写的:

	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

不知道理解对不对💫

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions