[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Is an embedded ruby interpreter safe to unload

Lothar Scholz

3/10/2007 11:51:00 PM

Hello ruby-talk,

when i use ruby embedded in a program where i call "ruby_init", do a
few ruby magics and then call "ruby_finalize".

Will this free all used memory?


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's



4 Answers

gga

3/11/2007 9:46:00 AM

0

On 10 mar, 20:51, Lothar Scholz <mailingli...@scriptolutions.com>
wrote:
> Hello ruby-talk,
>
> when i use ruby embedded in a program where i call "ruby_init", do a
> few ruby magics and then call "ruby_finalize".
>
> Will this free all used memory?
>

You want to call ruby_cleanup(0); instead, like ruby_stop() does.
ruby_finalize() does not deal with threads.



Lothar Scholz

3/12/2007 12:05:00 AM

0

Hello gga,

>>
>> Will this free all used memory?
>>

g> You want to call ruby_cleanup(0); instead, like ruby_stop() does.
g> ruby_finalize() does not deal with threads.

Thanks,

i looked at the source and realize that there is no way to cleanly
shutdown the ruby interpreter. This will just call all registered exit
functions.

Very very bad because this means it's very hard to use memory leak checking
tools for extensions or much worse for systems that use ruby as an embedded
interpreter.


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's



Dave Heil

3/3/2011 10:55:00 AM

0

On 3/3/2011 08 14, Ray Fischer wrote:
> Dave Heil<k8mn@frontiernet.net> wrote:
>> On 3/2/2011 08 01, Ray Fischer wrote:
>>> Dave Heil<k8mn@frontiernet.net> wrote:
>>>> On 2/28/2011 17 21, JLS wrote:
>>>>> On Feb 28, 12:05 pm, "Bob"<dalnet...@att.net> wrote:
>>>>>> Civility on display.
>>>>>>
>>>>>> http://www.realclearpolitics.com/video/2011/02/27/fox_news_......
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Mr. President, I guess your people only believe in civility when things go
>>>>>> their way. The "community organizing" mentality breeds contempt among
>>>>>> working Americans.
>>>>>
>>>>> Yeah, hell, smacked in the head with a cudgel. NOT.
>>>>>
>>>>> Only thing I saw and heard were protesters chanting a universal truth
>>>>> known by all Americans: "FOX NEWS LIES!"
>>>>>
>>>>> Who could deny that?
>>>>
>>>> Anyone who recognizes the truth.
>>>>
>>>>> Nobody was hit.
>>>>
>>>> Reporter Mike Tobin was struck by a union thug.
>>>
>>> Rightard rule #1: lie, lie again, lie more, lie about lying.
>>
>> So your new claim is that YOU are a Rightard?
>
> So you admit that you're a lying fascist?

You're operating under: lie, lie again, lie more, lie about lying.
QED, Wrong Ray.

Harold Burton

3/13/2011 1:47:00 AM

0

In article <4d6df972$0$10583$742ec2ed@news.sonic.net>,
rfischer@sonic.net (Ray Fischer) wrote:

> Dave Heil <k8mn@frontiernet.net> wrote:
> >On 2/28/2011 17 21, JLS wrote:
> >> On Feb 28, 12:05 pm, "Bob"<dalnet...@att.net> wrote:
> >>> Civility on display.
> >>>
> >>> http://www.realclearpolitics.com/video/2011/02/27/fox_news_......
> >>>
> >>> --
> >>>
> >>> Mr. President, I guess your people only believe in civility when things go
> >>> their way. The "community organizing" mentality breeds contempt among
> >>> working Americans.
> >>
> >> Yeah, hell, smacked in the head with a cudgel. NOT.
> >>
> >> Only thing I saw and heard were protesters chanting a universal truth
> >> known by all Americans: "FOX NEWS LIES!"
> >>
> >> Who could deny that?
> >
> >Anyone who recognizes the truth.
> >
> >> Nobody was hit.
> >
> >Reporter Mike Tobin was struck by a union thug.
>
> Rightard rule #1: lie, lie again, lie more, lie about lying.


Lefturd rule #1: lie, lie again, lie more, lie about lying.

snicer