Reduce Session Factory memory footprint: drop reference to SessionFactoryOptions

Description

During construction of org.hibernate.internal.SessionFactoryImpl, an anonymous class (SessionFactoryOptions) is created. This class has an implicit references to redundant objects. As result the garbage collector cannot delete them.
I think that it's better to create this class not as anonymous one and construct him with only relevant parameters (my implementation is attached).

Environment

All.

Assignee

Maxim Kirilov

Reporter

Maxim Kirilov

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure