Difference between revisions of "Truxton location destroy"
Jump to navigation
Jump to search
(Created page with "This destroys a location object. =Syntax= <source lang="C"> void truxton_location_destroy( uint64_t location ); </source> =Parameters= ==<code>location</code>== The handle t...") |
|||
| Line 9: | Line 9: | ||
==<code>location</code>== | ==<code>location</code>== | ||
The handle to the location object. | The handle to the location object. | ||
| − | This handle comes from calling <code>[[truxton_location_create]]()</code> or<code>[[truxton_child_file_create_location]]()</code> | + | This handle comes from calling <code>[[truxton_location_create]]()</code> or <code>[[truxton_child_file_create_location]]()</code> |
=Sample= | =Sample= | ||
Revision as of 07:36, 13 December 2020
This destroys a location object.
Contents
Syntax
void truxton_location_destroy( uint64_t location );
Parameters
location
The handle to the location object.
This handle comes from calling truxton_location_create() or truxton_child_file_create_location()
Sample
void create_location(void)
{
uint64_t truxton = truxton_create();
uint64_t location = truxton_location_create(truxton);
truxton_location_save();
uint64_t new_id = truxton_file_get_id( file_type );
if ( new_id == 0 )
{
printf( "Failed to create new file type\n" );
}
else
{
printf( "Created new file type as id %" PRIu64 "\n", new_id );
}
truxton_location_destroy(location);
truxton_destroy(truxton);
}