Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
928 stars 209 forks source link

Memory leak after opening the "Create Structure" dialog #4779

Closed xusheng6 closed 11 months ago

xusheng6 commented 11 months ago

Version and Platform (required):

Bug Description: There is a memory leak on the binary view object if I used the "create structure" functionality by pressing "S"

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Open any binary
  2. Swtich to HLIL, select any variable
  3. Press "S" to call up the "Create Structure" dialog
  4. Press Enter to accept the default settings
  5. Close the binary
  6. Run get_memory_usage_info in the Python console and observer the leak

Expected Behavior: No memory leak on the binary view object

Additional Information: I noticed this issue while working with https://github.com/Vector35/binaryninja-api/pull/4766/

xusheng6 commented 11 months ago

This is a regression introduced between 3.3 and 3.4. It is very likely caused by the inherited member support.

The issue can be triggered by simply creating a new struct in the types view via the "Create Structure" dialog opening the "Create Structure" dialog