©2003 Kåre Sjölander and Jonas Beskow
Introduction Download Documentation Links Forum
WaveSurfer user forum

FAQ  FAQ
Search  Search
Memberlist  Memberlist
Register  Register
Profile  Profile
Login  Login

Importance of tkSnack.Sound.destroy()

 
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer
View previous topic :: View next topic  
Author Message
mickel



Joined: 17 Dec 2002
Posts: 28
Location: Espoo, Finland

PostPosted: Tue Nov 11, 2003 3:24 pm    Post subject: Importance of tkSnack.Sound.destroy() Reply with quote

This is again really a Snack (from Python) question but I'll post it here anyway as I guess it might be of interest to developers using the Wsurf package.

How important is it to do destroy() on in-memory tkSnack.Sound objects when they are not needed anymore?

Does Python understand too free up the resources used when the reference count to the tkSnack.Sound object in question is zero or will the allocated memory be left hanging even when my Python program dies?

I realize this might be a silly question, but I haven't used C libraries from Python before Snack, so I don't know how careful I must be with freeing up the resources used.

/Mickel
Back to top
View users profile Send private message Visit posters website
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Mon Nov 17, 2003 4:18 pm    Post subject: Reply with quote

Currently, you have to use destroy() explicitly in order to free up memory during excution, when the program dies this is done automatically.

Hopefully this will not always be the case icon_wink.gif

Kåre
Back to top
View users profile Send private message Visit posters website
mickel



Joined: 17 Dec 2002
Posts: 28
Location: Espoo, Finland

PostPosted: Wed Nov 19, 2003 11:31 am    Post subject: Reply with quote

OK. That means I must be more careful with freeing allocated memory. (Currently I seem to get Snack to dump core, when I destroy the tkSnack.Sound object in use in my Wsurf widget before actually destroying the Wsurf widget. But that is really my problem ...)

/Mickel
Back to top
View users profile Send private message Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.1 © 2001, 2002 phpBB Group