If you're having issues compiling, the code can absolutely not be ruled out. And issues like that are for Stack Overflow.
Be careful with the technical terms you use. Compile time and run time issues are completely different things. Garbage collection and "flushing memory" aren't synonymous.
You'll need to describe a specific issue in all cases, and ruling out your code is pretty much a non-starter unless, for example, you know that the behavior your program has is "correct" and you need to find a way to increase a given resource limit to make it work.
If your in a case where you know your code is correct but need to tune OS/user settings, Server Fault or Super User, depending on context, could be OK.
Otherwise I think Stack Overflow should be the place to go to.
In any case, if you formulate a good question with enough details about what your actual problem is, and what you've tried so far to fix/improve/workaround it, and it happens to land on the "wrong" site, it will get migrated fast enough.
Good questions get tended to very well by the community. It's not a deathly sin to post on the wrong site for borderline questions (and some questions fit well on more than one site).