Skip to content

Strengthened txm_module_object_deallocate deprecation notice#32

Open
fdesbiens wants to merge 1 commit into
eclipse-threadx:mainfrom
fdesbiens:fdesbiens/deprecate-txm-module-object-deallocate
Open

Strengthened txm_module_object_deallocate deprecation notice#32
fdesbiens wants to merge 1 commit into
eclipse-threadx:mainfrom
fdesbiens:fdesbiens/deprecate-txm-module-object-deallocate

Conversation

@fdesbiens

Copy link
Copy Markdown
Contributor

Summary

Rewrote the txm_module_object_deallocate API entry in Chapter 4 to:

  • Lead with a prominent WARNING admonition and an explicit Do not use directive.
  • Explain clearly why the function is deprecated: the Module Manager dispatch layer already pairs every tx_*_delete() call with automatic pool deallocation.
  • Document the risk of misuse: calling it on a live object is a use-after-free defect.
  • Provide a concrete correct-usage example showing tx_timer_delete() alone (no separate deallocation call).
  • Remove the old example that incorrectly showed txm_module_object_deallocate() being called.

Companion

Code change: eclipse-threadx/threadx#559 (pending)

Rewrote the API description to lead with a prominent WARNING admonition
and a clear 'Do not use' directive. Added an explanation of why the
function is deprecated (the dispatch layer already handles pool release)
and a concrete example showing the correct pattern (tx_timer_delete only,
no separate deallocation call). Removed the misleading example that
showed txm_module_object_deallocate being called.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant