js_destroy(3)

NAME
js_destroy - destroy a js_string object

SYNOPSIS
#include JsStr.h

int js_destroy(js_string *object);

DESCRIPTION
js_destroy destroys an existing js_string object, freeing any memory the js_string object allocated.

ARGUMENTS
object is a pointer to the js_string object you wish to destroy.

RETURN VALUE
js_destroy returns JS_SUCCESS if it was able to destroy the js_string object in question. If it is unable to destroy js_string object, this function will return the value JS_ERROR. The most common reason for not being able to destory an object is because the object is not a legitimate js_string object.

EXAMPLE
The following example creates then destroys a js_string object.

	js_string *foo;
	foo = js_create(256,1);
	js_destroy(foo);

AUTHOR
Sam Trenholme <kiwi-zttfryb@koala.samiam.org>