HaxeFoundation / HaxeFoundation/hxcpp

Function types being converted to dynamic types

Open
#997 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

Hxcpp transforms function types into dynamics (shown [here](https://imgur.com/a/NxXJ7iM)). Surely it should be converted into a C++ callback in the traditional sense or Callable?

Using [HxScout ](https://hxscout.com/) showed a large object footprint when using function types for callbacks, i.e. `var func : Float -> Void;` and then calling `func(3.0)`. A 'Float' object was created each frame which then needed to be garbage collected. This incurs a big cost at runtime because any time a callback is required, the garbage collector is clearing up potentially thousands of objects that have been seemingly generated for no reason.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.