Comments on: Ruby: Why to use symbols as Hash keys ( and why not ) https://lizards.opensuse.org/2012/05/24/ruby-why-use-symbols-in-hash-instead-of-strings-and-when-dont-do-it/ Blogs and Ramblings of the openSUSE Members Fri, 06 Mar 2020 17:50:09 +0000 hourly 1 https://wordpress.org/?v=4.7.5 By: Anonymous https://lizards.opensuse.org/2012/05/24/ruby-why-use-symbols-in-hash-instead-of-strings-and-when-dont-do-it/#comment-7480 Mon, 28 May 2012 08:32:46 +0000 http://lizards.opensuse.org/?p=8678#comment-7480 Nikos: yes, it is stored in memory when first time occur. If you look at my code I run explicitly garbage collection (GC.start after each call of test). Only solution what how can server side prevent this is to run new ruby process for each request and then exit it ( of course I don’t mention correct solution to not translate unknown string to symbol ).

]]>
By: Nikos https://lizards.opensuse.org/2012/05/24/ruby-why-use-symbols-in-hash-instead-of-strings-and-when-dont-do-it/#comment-7468 Sun, 27 May 2012 10:35:38 +0000 http://lizards.opensuse.org/?p=8678#comment-7468 Hey Josef, great post! Regarding your comment on DOS how will this be possible? Do you mean that this would happen because of a long symbol stored in memory? In that case are you sure garbage collection will not handle this between requests?

]]>