MCPcopy Create free account
hub / github.com/GNOME/gjs / add_associated_memory

Method add_associated_memory

gi/struct.cpp:153–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void StructInstance::add_associated_memory(JSObject* obj) {
154 if (gtype() == G_TYPE_BYTES && m_ptr) {
155 size_t size = g_bytes_get_size(m_ptr.as<GBytes>());
156 JS::AddAssociatedMemory(obj, size, MemoryUse::GObjectInstanceStruct);
157 }
158}
159
160void StructInstance::remove_associated_memory(JSObject* obj) {
161 if (gtype() == G_TYPE_BYTES && m_ptr) {

Callers 1

new_for_c_struct_implMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected