---
name: "tickit_string_ref"
section: "3"
platform: "linux"
package: "libtickit-dev"
version: "0.4.3-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tickit_string_ref"
---

# tickit\_string\_ref(3)

adjust the refcount of a counted string

## NAME

tickit\_string\_ref, tickit\_string\_unref - adjust the refcount of a counted string

## SYNOPSIS

```
#include <tickit.h>

TickitString *tickit_string_ref(TickitString *s);
void tickit_string_unref(TickitString *s);
```

Link with *-ltickit*.

## DESCRIPTION

**tickit\_string\_ref**() increments the stored refcount of the given counted string instance by one. It returns the pointer argument itself, so it is useful for chaining.

**tickit\_string\_unref**() decrements the stored refcount of the given counted string instance by one. If the refcount drops to zero, the instance is destroyed.

## RETURN VALUE

**tickit\_string\_ref**() returns a counted string instance pointer. **tickit\_string\_unref**() returns no value.

## SEE ALSO

[**tickit\_string\_new**(3)](/tickit_string_new/3.md), [**tickit\_string**(7)](/tickit_string/7.md), [**tickit**(7)](/tickit/7.md)
