Inability to free what GMT_Encode_Options return
@PaulWessel がすでに取り組んでいます。
2021年4月7日 から。
評価
この issue はまだ評価されていません。
説明
Description of the problem
Since I am building GMT with DEBUG and MEM_DEBUG I get messages upon module exit if there were memory leaks. WHen I quit MATLAB after testing gmtmex I may get many of these, probably one for each module call:
Matlab [WARNING]: Memory not freed first allocated in gmt_api.c:12781(GMT_Encode_Options) (ID = 141): 0.141 kb [144 bytes]
The problem is that gmtmex.c does not bother to free the info structure array returned by GMT_Encode_Options. OK, so two issues:
- That array is allocated with GMT_memory and thus is tracked by GMT's garbage man
- The API has no way of calling GMT_free since all it has is GMT_Destroy_Data which would not work on some random array.
I think the solution is:
- Let GMT_Encode_Options allocate directly with malloc/realloc and not GMT_memory
- Let gmtmex.c clean up after itself.
OK with you @joa-quim ?
- 主要言語
- MATLAB
- スター
- 53
- フォーク
- 19
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GenericMappingTools/gmtmex のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
GenericMappingTools/gmtmex#33 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
GenericMappingTools/gmtmex#31 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
GenericMappingTools/gmtmex#30 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
GenericMappingTools/gmtmex#12 · コメント 6 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
GenericMappingTools/gmtmex#8 · コメント 2 件 ·
GenericMappingTools/gmtmex の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
MohammadRaziei/ctoon#12 ·
-
easy first-contributor first-contributors good first issue help wanted matlab up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
fork-commit-merge/fork-commit-merge#8766 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
UniprJRC/DSwithMATLAB#253 ·
-
area: math-chaos priority: P1 size: S type: docs
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ibra-kdbra/Math-Problems#309 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100