class Safec::Macros::SafeCStructMacroExample::Free

Overview

Represents a C pointer to memory that is got free on GC finalize.

This class was automatically defined by the Safec library.

Included Modules

Defined in:

doc/macros.cr:25
doc/macros.cr:27

Instance Method Summary

Instance methods inherited from module Safec::Macros::SafeCStructMacroExample::AsFree

free(p : Pointer(Safec::Macros::SafeCStructMacroExample::C::Struct)) free

Instance Method Detail

def free(p) #

[View source]
def null? #

Tests if this pointer is null.


[View source]
def p : Pointer(Safec::Macros::SafeCStructMacroExample::C::Struct) #

Returns this C pointer.


[View source]
def to_unsafe : Pointer(Safec::Macros::SafeCStructMacroExample::C::Struct) #

Returns this C pointer.


[View source]
def value #

Return the struct value pointed by this pointer.


[View source]