Page MenuHome

BGE: Fix issues with async libload.
ClosedPublic

Authored by Porteries Tristan (panzergame) on Oct 21 2015, 5:37 PM.

Details

Summary

This patch fixes:

  • the call of LibFree on a unfinished loaded library;
  • memory leak created on end of game : the async libraries are loaded but not converted, so not freed with the master scene.

Diff Detail

Repository
rB Blender
Branch
ge_async_libload

Event Timeline

Mitchell Stokes (moguri) requested changes to this revision.Oct 21 2015, 11:00 PM
Mitchell Stokes (moguri) edited edge metadata.

Mostly looks good. Just some minor tweaks. Also, was this tested with memcheck (Valgrind) and/or Helgrind?

source/gameengine/Converter/KX_BlenderSceneConverter.cpp
184

You should add a comment on why this now needs to be here (e.g., must be called after X to avoid a memory leak).

1036

I would like to keep I/O consistent. The rest of this file is using printf(), so I'd stick with that.

source/gameengine/Converter/KX_LibLoadStatus.h
47

We might as well expose this to Python since it's one extra line to add it to KX_LibLoadStatus::Attributes.

74

I would prefer this to be IsFinished()

This revision now requires changes to proceed.Oct 21 2015, 11:00 PM
source/gameengine/Converter/KX_LibLoadStatus.cpp
39

0.0f

Porteries Tristan (panzergame) edited edge metadata.
  • Rename GetFinished to IsFinished, expose m_finished in python : "finished", add comment.
Mitchell Stokes (moguri) edited edge metadata.
This revision is now accepted and ready to land.Oct 22 2015, 8:20 PM
Jorge Bernal (lordloki) requested changes to this revision.Oct 25 2015, 4:07 PM
Jorge Bernal (lordloki) edited edge metadata.

It is necessary to add "finished" attribute to rst docs. Other than this, looks good to me

This revision now requires changes to proceed.Oct 25 2015, 4:07 PM
Porteries Tristan (panzergame) edited edge metadata.
  • Replace 0.f to 0.0f in KX_LibLoadStatus::KX_LibLoadStatus
Jorge Bernal (lordloki) edited edge metadata.

Good work. LGTM

This revision is now accepted and ready to land.Oct 25 2015, 6:55 PM
This revision was automatically updated to reflect the committed changes.