Elvas Tower: Sound Source associated with a signal is never removed - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Sound Source associated with a signal is never removed Rate Topic: -----

#1 User is offline   dennisat 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 474
  • Joined: 16-February 13
  • Gender:Male
  • Simulator:Open Rails & MSTS
  • Country:

Posted 13 December 2014 - 01:44 AM

I've noticed that the Sound Source associated with a signal is never removed once created. After an hour's running of a route that has hundreds of signals, like Briscard, you can end up with 200 or more inactive signal Sound Sources. These, of course, just add to unnecessary resource consumption in the Sound Update process. Looking at the code of signals.cs I notice that these Sound Sources are supposedly IDisposable. However, I have inserted a trace in the Dispose method and it is never entered. A very similar setup, it seems, is a level crossing Sound Source and that does get removed after being inactive for a while.

I can't see why the signal Sound Sources are never removed. Any ideas from the C# gurus amongst you?

Dennis

Edit:
Sorry, this has been happening for all releases for months.

#2 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 December 2014 - 03:22 AM

Being IDisposable or not makes no difference to whether something is collected, although I do think it's a bad idea in a game. In any case, something must be hanging on to the sound sources... let me look.

#3 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 December 2014 - 04:20 AM

Fixed in X2708.

#4 User is offline   dennisat 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 474
  • Joined: 16-February 13
  • Gender:Male
  • Simulator:Open Rails & MSTS
  • Country:

Posted 13 December 2014 - 04:39 AM

View PostJames Ross, on 13 December 2014 - 04:20 AM, said:

Fixed in X2708.


Thanks very much, that was quick.
I'll be trying it as soon as I've completed today's duties - putting up the outside Christmas lights.

Dennis

#5 User is offline   dennisat 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 474
  • Joined: 16-February 13
  • Gender:Male
  • Simulator:Open Rails & MSTS
  • Country:

Posted 13 December 2014 - 02:03 PM

View Postdennisat, on 13 December 2014 - 04:39 AM, said:

I'll be trying it as soon as I've completed today's duties -


Haven't had a lot of time to try the fix but what I've seen indicates a major improvement. So far, there appear to be no sounds lingering beyond their sell by date. I'll try and get a few more tests in tomorrow.

Dennis

#6 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 December 2014 - 02:10 PM

View Postdennisat, on 13 December 2014 - 02:03 PM, said:

Haven't had a lot of time to try the fix but what I've seen indicates a major improvement. So far, there appear to be no sounds lingering beyond their sell by date. I'll try and get a few more tests in tomorrow.


Great, thanks for testing!

#7 User is offline   dennisat 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 474
  • Joined: 16-February 13
  • Gender:Male
  • Simulator:Open Rails & MSTS
  • Country:

Posted 15 December 2014 - 07:47 AM

I've done quite a few tests on this fix now and the problem is completely resolved as far as I'm concerned.
Thanks again for the quick fix.

Dennis

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users