Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
Memory Leak(?) when calling ImageView.setTranslateX() often (once per frame)
Post Body

At the docs it says

This variable can be used to alter the location of a node without disturbing its layoutBounds, which makes it useful for animating a node's location.

"Animate" should mean that you call it once every frame, right?

Here is some short example code to demonstrate what I'm talking about:

https://gist.github.com/ChristophHaag/661be992429b451218e9ee1fb0eacdec

and the important part is

imv.setTranslateX(imv.getTranslateX()   deltax);
imv.setTranslateY(imv.getTranslateY()   deltay);
imv.setRotate(imv.getRotate()   1);

inside the AnimationTimer.

If I run this program with openjdk8 or oracle jdk 8 on Linux, it will eat Gigabyte after Gigabyte of memory and consume a massive amount of CPU resources.

jvisualvm doesn't work for this because it doesn't support java 8 lambdas, but the netbeans profiler has a workaround for that. I tried looking in there, but as far as I can see all that time is spent in some X11 GLES code: https://i.imgur.com/KqZU91l.png

Is this just a platform issue? Can someone on Windows or something like that test it and report back?

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
12,252
Link Karma
1,066
Comment Karma
11,186
Profile updated: 6 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
8 years ago