Skip to content
Shahbaz Youssefi edited this page Jun 3, 2015 · 2 revisions

Starting Skinware Up

Before using Skinware, it needs to be set up using skin_init(). This function creates the Skinware environment, or attaches to it if it is already created by another Skinware-based process. It returns a pointer to the opaque struct skin data structure.

struct skin *skin = skin_init();
if (skin == NULL)
    /* this is an error */

Before terminating the process, make sure to cleanup Skinware as well:

skin_free(skin);

Note that without this last step, the shared resources created during skin_init() will not be returned to the operating system and the running threads won't be cleanly shut down. You really don't want to miss this.

Advanced Tip

In case you forget to cleanup Skinware, you can do this cleanup with tools provided by URT. The urt_names program can be used to view what shared resources have remained in the system. The resources created by Skinware have the default prefix SKN, for example SKNMEM, SKNGL and SKNDL. You can remove these resources with the urt_clear program:

urt_clear SKNMEM SKNGL SKNDL
Clone this wiki locally