4
Answers

Windows service allocates memory continuosly, how can I handle it?

Photo of eno one

eno one

16y
3.8k
1
I have created a windows service that starts a thread which writes periodically to a database.
It is doing the job that I wanted but there is a problem.
In the task manager the process that starts by teh service increases in memory usage, 8 KB every 30 seconds.
Since the service is ment to be ran 24 hours a day. I think that the memory usage increasing is a problem.
Does anybody know how to handle this?
Thanks in advance.

Answers (4)

0
Photo of Laxmidhar Sahoo
NA 2.3k 1.4k 7y
sir can show the root folder name 
and then subfolders  
0
Photo of Laxmidhar Sahoo
NA 2.3k 1.4k 7y
sir change from '.app/app.component.html'
 
to
 
'component.html'
 
This may work
0
Photo of Dharmraj Thakur
NA 4.1k 61.7k 7y
Replace Your main.ts with following code...
 
  1. import { enableProdMode } from '@angular/core';  
  2. import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';  
  3.   
  4. import { AppModule } from './app/app.module';  
  5.   
  6. platformBrowserDynamic().bootstrapModule(AppModule); 

Still not working then please check by changin <base href=""> of index.html
 
0
Photo of narasiman rao
NA 519 491.6k 7y
App.module.ts code as follows
 
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
 
Main.ts code as follows
 
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));
 
i send the code of main.ts and app.module.ts.
0
Photo of Dharmraj Thakur
NA 4.1k 61.7k 7y
Code is correct, there is no any mistake. please show your main.ts, appModule.ts and