Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

シリアライザ・デシリアライザの削除処理の修正 #1136

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

Nobu19800
Copy link

Identify the Bug

ごく稀に以下のassert文に引っかかる場合がある。

assert(m_objects.count(obj) == 0);

これはSerializerFactory::instance().createObject関数で生成したオブジェクトは動的配列に追加されるが、delete文でメモリの解放だけして動的配列で保持したポインタがそのままだと、まれにこのエラーが発生する場合がある。

Description of the Change

SerializerFactory::instance().createObject関数で生成したオブジェクトをdelete文で削除していたため、SerializerFactory::instance().deleteObject()で削除するように修正した。

Verification

  • Did you succeed the build?
  • No warnings for the build?
  • Have you passed the unit tests?

@Nobu19800 Nobu19800 added the bug Something isn't working label Apr 9, 2024
@Nobu19800 Nobu19800 requested review from n-ando and n-kawauchi April 9, 2024 05:01
@Nobu19800 Nobu19800 self-assigned this Apr 9, 2024
Copy link

@n-kawauchi n-kawauchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ビルドが通ることは確認しました。

@n-ando n-ando merged commit 0cf13a9 into OpenRTM:master Apr 15, 2024
1 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants