You have confused flushing with clearing:
flushing a session executes all pending statements against the database (it synchronizes the in-memory state with the database state);
clearing a session purges the session (1st-level) cache, thus freeing memory.
So you need to both flush and clear a session in order to recover the occupied memory.
In addition to that, you must disable the 2nd-level cache. Otherwise all (or most of) the objects will remain reachable even after clearing the session.