Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I start typing a question (which may be interesting and useful), but then think and/or google more and find answer myself.
Should I just close the window or add the question with my answer to enrich solutions database?
Yes, but only if you didn't find the answer on StackOverflow. :-)