25 May '13 - 04:01 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: "Garbage collecting" BASS objects  (Read 420 times)
Bellhop
Posts: 30


« on: 1 Mar '12 - 14:05 »
Reply with quoteQuote

Is there an accepted way to "garbage collect" orphaned objects created in BASS? For example, "x" streams are created, but only "x - 1" streams are freed. Although I'm taking every care to clean up objects after use, this application will run unattended for long periods of time and well, stuff happens. I'm working from vb.NET but of course, BASS objects are unknown to .NET. Before I re-invent the wheel, I thought that I would check to see if this problem had already been addressed.
Logged
radio42
Posts: 4012


« Reply #1 on: 1 Mar '12 - 18:52 »
Reply with quoteQuote

There shouldn't be any real problem.
BASS is native code (unmanaged).
So when you create a stream, you MUST take care by yourself to also free it.
This is pretty must as if you would open a file and forget to close it.
There is nothing BASS or .Net can do about, since it lies in your applications responsibility to do so, as nobody else would know, if you still want to use a created stream handle or not.
Logged
Bellhop
Posts: 30


« Reply #2 on: 1 Mar '12 - 19:29 »
Reply with quoteQuote

 Undecided That's understood, "radio42". I do have software in place to track what I'm using and to remove what I'm finished with. I would also like something that could search for things and remove those things that don't have a reason to exist. Should my "list" of "stuff" become corrupted, then I need a way to recover.

I thought that I would post to see if someone has already done this thing before I set out to write my own from scratch.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines