Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resident in memory objects #357

Open
casph opened this issue Sep 16, 2016 · 1 comment
Open

Resident in memory objects #357

casph opened this issue Sep 16, 2016 · 1 comment

Comments

@casph
Copy link

casph commented Sep 16, 2016

I've an application running in a tomcat 6 container thats compiles some less files runtime when required by the user.

Using jProfile after compile (see code below), i've noticed that less4j keeps many static objects in memory.

jprofile-less

LessSource lessSource = new LessSource.FileSource(file, "UTF-8");

Map<String, String> vars = new HashMap<>();
vars.put("@context", "\"" + req.getContextPath() + "\"");

LessCompiler compiler = new ThreadUnsafeLessCompiler();

Configuration configuration = new Configuration();
configuration.setCompressing(true);
configuration.addExternalVariables(vars);

CompilationResult result = compiler.compile(source, configuration);
result.getCss();

Static object remains always in memory, how can i free them?

Thanks, Phaedra.

@casph
Copy link
Author

casph commented Sep 23, 2016

No one have noticed this behaviour?

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

No branches or pull requests

1 participant