Skip to content

Adapt to new simfil API#237

Merged
josephbirkner merged 5 commits intomapview-refactoringfrom
simfil-api-changes
Oct 20, 2025
Merged

Adapt to new simfil API#237
josephbirkner merged 5 commits intomapview-refactoringfrom
simfil-api-changes

Conversation

@johannes-wolf
Copy link
Contributor

@johannes-wolf johannes-wolf commented Oct 6, 2025

Updates erdblick to use the changed simfil API from PR Klebert-Engineering/simfil#121

  • Using std::stringstream in a tight loop results in memory bugs under emscripten,
    we already had a similar problem in simfil (internal std::locale calls keep allocating memory for some reason).

  • Ensure to always call delete() on C++ objects. I've moved some calls into finally blocks.

@josephbirkner josephbirkner changed the base branch from main to mapview-refactoring October 20, 2025 12:05
Copy link
Collaborator

@josephbirkner josephbirkner left a comment

Choose a reason for hiding this comment

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

Fantastic.

const result = uint8ArrayToWasm(
(wasmBuffer: any) => {
const featureLayerStyle = new coreLib.FeatureLayerStyle(wasmBuffer);
const featureLayerStyle = new coreLib.FeatureLayerStyle(wasmBuffer); // FIXME: No delete? Why create the object twice?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, we also caught this one in our refactoring 😄

@josephbirkner josephbirkner merged commit eb239bf into mapview-refactoring Oct 20, 2025
2 checks passed
@josephbirkner josephbirkner deleted the simfil-api-changes branch October 20, 2025 12:11
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.

2 participants