Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/capi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,20 @@ Sections
checks for inactive Sections and removes them (they are not returned).
Only after there are no references to a deleted Section will its memory be freed.

.. c:function:: void nrn_section_ref(Section* sec)

Increase the Section's reference count. Sections with active references will
not be free'd from memory.

:param sec: Pointer to the Section to reference.

.. c:function:: void nrn_section_unref(Section* sec)

Decrease the Section's reference count. Sections with active references will
not be free'd from memory.

:param sec: Pointer to the Section to unreference.

.. c:function:: Section* nrn_cas(void)

Get the currently accessed Section (top of the Section stack).
Expand Down
2 changes: 2 additions & 0 deletions src/nrniv/neuronapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ void nrn_mechanism_insert(Section* sec, const Symbol* mechanism);
nrn_Item* nrn_allsec(void);
nrn_Item* nrn_sectionlist_data(const Object* obj);
bool nrn_section_is_active(const Section* sec);
void nrn_section_ref(Section* sec);
void nrn_section_unref(Section* sec);
Section* nrn_cas(void);

/****************************************
Expand Down
Loading